haskell-te: d46070d8eb26807bd5d200df07743553fa24297b
1: # Looks up info from the environment, returns a Haskell package set for nix-eval
2: # to use during exploration
3: with builtins;
4: with rec {
5: support = import ./.. {};
6: hs = if getEnv "HASKELL_PACKAGES" == ""
7: then support.haskellPackages
8: else import (getEnv "HASKELL_PACKAGES");
9: hsDirs = fromJSON (getEnv "OUT_DIRS");
10: hsPkgs = hs.override {
11: overrides = support.hsOverride (self: super: listToAttrs (map
12: (d: {
13: value = self.callPackage d {};
14: name = support.pkgName (support.haskellPackages.callPackage d {}).name;
15: })
16: hsDirs));
17: };
18: };
19:
20: assert all (d: typeOf d == "path" || (isString d && substring 0 1 d == "/"))
21: hsDirs || abort "Value of 'OUT_DIRS' is '${toJSON hsDirs}'";
22: hsPkgs
Generated by git2html.