-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdefault.nix
More file actions
58 lines (49 loc) · 1.96 KB
/
Copy pathdefault.nix
File metadata and controls
58 lines (49 loc) · 1.96 KB
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
{ # Is this a nix-shell invocation?
inNixShell ? false
# Do we want the full Agda package for interactive use? Set to false in CI
, interactive ? true
, system ? builtins.currentSystem
}:
let
pkgs = import ./nix/nixpkgs.nix { inherit system; };
forester = builtins.getFlake "git+https://git.sr.ht/~jonsterling/ocaml-forester?ref=refs/tags/5.0";
myForester = forester.legacyPackages.${system};
overlay = final: prev: {
dune = prev.dune.overrideAttrs (o: {
version = "3.17.2";
src = builtins.fetchurl {
url = "https://github.com/ocaml/dune/releases/download/3.17.2/dune-3.17.2.tbz";
sha256 = "0r7al83jwkdfk6qvb53vrlzzfr08gwcydn1ccigfdsfg1vnzxslx";
};
nativeBuildInputs = o.nativeBuildInputs ++ [ pkgs.makeWrapper ];
postFixup =
if pkgs.stdenv.isDarwin then ''
wrapProgram $out/bin/dune \
--suffix PATH : "${pkgs.darwin.sigtool}/bin"
'' else "";
});
forester = prev.forester.overrideAttrs (_: {
DUNE_CACHE = "enabled";
DUNE_CACHE_TRANSPORT = "direct";
XDG_CACHE_HOME = "/tmp/dune-cache";
});
};
myForester' = myForester.overrideScope overlay;
treelist = builtins.getFlake "github:samtoth/treelist";
hsPkgs = pkgs.ourHaskellPackages;
agdaForester = (hsPkgs.callCabal2nix "agda-forester" ./. {}).overrideAttrs(old: {
buildInputs = (old.buildInputs or []) ++ [
myForester'.forester
treelist.legacyPackages.${system}.treelist
];
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [
treelist.legacyPackages.${system}.treelist
];
propagatedBuildInputs = (old.propagatedBuildInputs or [])
++ [ myForester'.forester
treelist.legacyPackages.${system}.treelist
hsPkgs.Agda
];
}
);
in agdaForester