-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
100 lines (94 loc) · 3.06 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
the1lab = {
url = "github:the1lab/1lab/aliao/list-sigma";
flake = false;
};
};
outputs = inputs@{ self, nixpkgs, ... }: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ (self: super: {
haskell = super.haskell // {
packageOverrides = hself: hsuper: {
Agda = with self.haskell.lib.compose; lib.pipe hsuper.Agda [
(overrideSrc {
version = "2.8.0";
src = pkgs.fetchFromGitHub {
owner = "agda";
repo = "agda";
rev = "3344ca8058ec35d08e13dfd188df19517023efb5";
hash = "sha256-sZ6afNUBXZPjauLA0JGoFlCKlgcGrGhEJQvKYW2VhtY=";
};
})
disableLibraryProfiling
disableExecutableProfiling
dontCheck
dontHaddock
(addBuildDepends [ hself.enummapset hself.generic-data hself.nonempty-containers hself.process-extras hself.pqueue ])
];
};
};
agdaPackages = super.agdaPackages.overrideScope (aself: asuper: {
_1lab = asuper._1lab.overrideAttrs {
version = "unstable-${inputs.the1lab.shortRev}";
src = inputs.the1lab;
};
cubical = asuper.cubical.overrideAttrs {
version = "unstable";
src = pkgs.fetchFromGitHub {
owner = "agda";
repo = "cubical";
rev = "2f085f5675066c0e1708752587ae788c036ade87";
hash = "sha256-3pTaQGJPDh9G68RmQAZM7AgBQ8jcqvEUteQep0MsVhw=";
};
};
standard-library = asuper.standard-library.overrideAttrs {
version = "2.1.1";
src = pkgs.fetchFromGitHub {
owner = "agda";
repo = "agda-stdlib";
rev = "v2.1.1";
hash = "sha256-4HfwNAkIhk1yC/oSxZ30xilzUM5/22nzbUSqTjcW5Ng=";
};
};
});
}) ];
};
inherit (nixpkgs) lib;
agdaLibs = libs: [
libs.standard-library
libs.cubical
libs._1lab
];
agda = pkgs.agda.withPackages agdaLibs;
AGDA_LIBRARIES_FILE = pkgs.agdaPackages.mkLibraryFile agdaLibs;
shakefile = pkgs.haskellPackages.callCabal2nix "cubical-experiments-shake" ./shake {};
in {
devShells.${system} = {
default = self.packages.${system}.default.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs or [] ++ [ agda ];
});
shakefile = pkgs.haskellPackages.shellFor {
packages = _: [ shakefile ];
inherit AGDA_LIBRARIES_FILE;
};
};
packages.${system} = {
default = pkgs.stdenv.mkDerivation {
name = "cubical-experiments";
src = self;
nativeBuildInputs = [ shakefile ];
inherit AGDA_LIBRARIES_FILE;
LC_ALL = "C.UTF-8";
buildPhase = ''
cubical-experiments-shake
mv _build/site "$out"
'';
};
inherit shakefile;
};
};
}