on iko/ghcjs-patch-master help sign in
Fix tool functions (#1570)
commitce047883ac95bb96e7f8361ff84631ce56dd2397 authorHamish Mackenzie <Hamish.K.Mackenzie@gmail.com> dateMon 1 Aug 2022, 23:57 (4 years ago) parent33ac5a1
3 files changed+13−9
builder/shell-for.nix+1−1 overlays/haskell.nix+4−4 overlays/tools.nix+8−4
builder/shell-for.nix+1−1
@@ -152,7 +152,7 @@ in
152152 nativeBuildInputs = [ ghcEnv ]
153153 ++ nativeBuildInputs
154154 ++ mkDrvArgs.nativeBuildInputs or []
155− ++ lib.attrValues (buildPackages.haskell-nix.tools evalPackages compiler.nix-name tools)
155+ ++ lib.attrValues (buildPackages.haskell-nix.tools' evalPackages compiler.nix-name tools)
156156 # If this shell is a cross compilation shell include
157157 # wrapper script for running cabal build with appropriate args.
158158 # Includes `--with-compiler` in case the `cabal.project` file has `with-compiler:` in it.
overlays/haskell.nix+4−4
@@ -496,8 +496,8 @@ final: prev: {
496496 inherit pkg-set;
497497 plan-nix = callProjectResults.projectNix;
498498 inherit (callProjectResults) index-state;
499− tool = final.buildPackages.haskell-nix.tool pkg-set.config.compiler.nix-name;
500− tools = final.buildPackages.haskell-nix.tools pkg-set.config.compiler.nix-name;
499+ tool = final.buildPackages.haskell-nix.tool' evalPackages pkg-set.config.compiler.nix-name;
500+ tools = final.buildPackages.haskell-nix.tools' evalPackages pkg-set.config.compiler.nix-name;
501501 roots = final.haskell-nix.roots pkg-set.config.compiler.nix-name;
502502 projectFunction = haskell-nix: haskell-nix.cabalProject';
503503 inherit projectModule buildProject args;
@@ -788,8 +788,8 @@ final: prev: {
788788 inherit (pkg-set.config) hsPkgs;
789789 inherit pkg-set;
790790 stack-nix = callProjectResults.projectNix;
791− tool = final.buildPackages.haskell-nix.tool pkg-set.config.compiler.nix-name;
792− tools = final.buildPackages.haskell-nix.tools pkg-set.config.compiler.nix-name;
791+ tool = final.buildPackages.haskell-nix.tool' evalPackages pkg-set.config.compiler.nix-name;
792+ tools = final.buildPackages.haskell-nix.tools' evalPackages pkg-set.config.compiler.nix-name;
793793 roots = final.haskell-nix.roots pkg-set.config.compiler.nix-name;
794794 projectFunction = haskell-nix: haskell-nix.stackProject';
795795 inherit projectModule buildProject args;
overlays/tools.nix+8−4
@@ -77,12 +77,16 @@ in { haskell-nix = prev.haskell-nix // {
7777 tool = compiler-nix-name: name: versionOrMod:
7878 final.haskell-nix.hackage-tool (
7979 final.haskell-nix.haskellLib.versionOrModToMods versionOrMod
80− ++ [{ inherit compiler-nix-name name; }]
80+ ++ [(lib.mapAttrs (_: lib.mkOverride 1100) { inherit compiler-nix-name name; })]
8181 );
8282
83− tools = evalPackages: compiler-nix-name:
84− lib.mapAttrs (name: versionOrMod:
83+ # tool with a default evalPackages to use.
84+ tool' = evalPackages: compiler-nix-name: name: versionOrMod:
8585 final.haskell-nix.hackage-tool (
8686 final.haskell-nix.haskellLib.versionOrModToMods versionOrMod
87− ++ [{ inherit evalPackages compiler-nix-name name; }]));
87+ ++ [(lib.mapAttrs (_: lib.mkOverride 1100) { inherit evalPackages compiler-nix-name name; })]
88+ );
89+
90+ tools = compiler-nix-name: lib.mapAttrs (final.haskell-nix.tool compiler-nix-name);
91+ tools' = evalPackages: compiler-nix-name: lib.mapAttrs (final.haskell-nix.tool' evalPackages compiler-nix-name);
8892}; }