Skip to content

Commit acb521e

Browse files
committed
simplify lib.nix
no need to expose hsrc since the options can be overridden on the resulting derivation too
1 parent 9071626 commit acb521e

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

nix/lib.nix

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,14 @@
33
...
44
}:
55
let
6-
hsrc =
7-
options:
8-
pkgs.haskellPackages.haskellSrc2nix {
9-
name = "agda2hs";
10-
src = ../.;
11-
extraCabal2nixOptions = options; # "--jailbreak"
12-
};
13-
hpkg = (pkgs.haskellPackages.callPackage (hsrc "") {}).overrideAttrs (
6+
hpkg = (pkgs.haskellPackages.callCabal2nix "agda2hs" ../. {}).overrideAttrs (
147
finAttr: preAttr: {
15-
# add ./dist/build/agda2hs to $PATH because
16-
# cabal2nix doesn't pick up agda2hs from build-tool-depends of the test suite
17-
# my (@liesnikov) guess is that since the intermediate binary
18-
# is not a separate derivation it's hard to form a fixpoint on a derivation level
8+
# add ./dist/build/agda2hs to $PATH
9+
# because cabal2nix doesn't pick up agda2hs from build-tool-depends of agda2hs-test
10+
# my (@liesnikov) guess is that since each cabal target is not a separate derivation
11+
# it's hard to form a fixpoint on a derivation level
1912
preCheck = "export PATH=$(pwd)/dist/build/agda2hs:$PATH";
20-
}
21-
);
13+
});
2214
expr = import ./agda2hs.nix;
2315
agda2hs = pkgs.lib.makeScope pkgs.newScope (
2416
self:
@@ -30,7 +22,6 @@ let
3022
);
3123
in
3224
{
33-
agda2hs-pkg = hsrc;
3425
agda2hs-hs = hpkg;
3526
agda2hs-expr = expr;
3627
inherit (agda2hs) agda2hs withPackages mkDerivation;

0 commit comments

Comments
 (0)