@@ -1,9 +1,7 @@
1+{ ghc }:
12with (import <nixpkgs> {});
23
34let
4− # MUST match GHC of resolver in stack.yaml
5− ghc = haskell.packages.ghc802.ghc;
6−
75 native_libs = [
86 libffi
97 zlib
@@ -15,17 +13,9 @@ let
1513 CoreServices
1614 ]);
1715
18−in stdenv.mkDerivation {
19−
16+in haskell.lib.buildStackProject {
17+ inherit ghc;
18+ buildInputs = native_libs;
2019 name = "idrisBuildEnv";
21−
22− buildInputs = [ ghc ] ++ native_libs;
23−
24− STACK_IN_NIX_EXTRA_ARGS = builtins.foldl'
25− (acc: lib:
26− " --extra-lib-dirs=${lib}/lib --extra-include-dirs=${lib}/include" + acc)
27− "" native_libs;
28−
29− # Needed if one wants to use ghci, due to https://ghc.haskell.org/trac/ghc/ticket/11042
30− LD_LIBRARY_PATH = builtins.concatStringsSep ":" (map (lib: lib.out + "/lib") native_libs);
20+ src = ./.;
3121}