on iko/ghcjs-patch-master help sign in
Fix tool functions (#1570)
ce04788Hamish Mackenzie
builder/shell-for.nix+1−1
@@ -152,7 +152,7 @@ in
152 nativeBuildInputs = [ ghcEnv ]
152 nativeBuildInputs = [ ghcEnv ]
153 ++ nativeBuildInputs
153 ++ nativeBuildInputs
154 ++ mkDrvArgs.nativeBuildInputs or []
154 ++ 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)
156 # If this shell is a cross compilation shell include
156 # If this shell is a cross compilation shell include
157 # wrapper script for running cabal build with appropriate args.
157 # wrapper script for running cabal build with appropriate args.
158 # Includes `--with-compiler` in case the `cabal.project` file has `with-compiler:` in it.
158 # 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: {
496 inherit pkg-set;
496 inherit pkg-set;
497 plan-nix = callProjectResults.projectNix;
497 plan-nix = callProjectResults.projectNix;
498 inherit (callProjectResults) index-state;
498 inherit (callProjectResults) index-state;
499− tool = final.buildPackages.haskell-nix.tool 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 pkg-set.config.compiler.nix-name;
500+ tools = final.buildPackages.haskell-nix.tools' evalPackages pkg-set.config.compiler.nix-name;
501 roots = final.haskell-nix.roots pkg-set.config.compiler.nix-name;
501 roots = final.haskell-nix.roots pkg-set.config.compiler.nix-name;
502 projectFunction = haskell-nix: haskell-nix.cabalProject';
502 projectFunction = haskell-nix: haskell-nix.cabalProject';
503 inherit projectModule buildProject args;
503 inherit projectModule buildProject args;
@@ -788,8 +788,8 @@ final: prev: {
788 inherit (pkg-set.config) hsPkgs;
788 inherit (pkg-set.config) hsPkgs;
789 inherit pkg-set;
789 inherit pkg-set;
790 stack-nix = callProjectResults.projectNix;
790 stack-nix = callProjectResults.projectNix;
791− tool = final.buildPackages.haskell-nix.tool 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 pkg-set.config.compiler.nix-name;
792+ tools = final.buildPackages.haskell-nix.tools' evalPackages pkg-set.config.compiler.nix-name;
793 roots = final.haskell-nix.roots pkg-set.config.compiler.nix-name;
793 roots = final.haskell-nix.roots pkg-set.config.compiler.nix-name;
794 projectFunction = haskell-nix: haskell-nix.stackProject';
794 projectFunction = haskell-nix: haskell-nix.stackProject';
795 inherit projectModule buildProject args;
795 inherit projectModule buildProject args;
overlays/tools.nix+8−4
@@ -77,12 +77,16 @@ in { haskell-nix = prev.haskell-nix // {
77 tool = compiler-nix-name: name: versionOrMod:
77 tool = compiler-nix-name: name: versionOrMod:
78 final.haskell-nix.hackage-tool (
78 final.haskell-nix.hackage-tool (
79 final.haskell-nix.haskellLib.versionOrModToMods versionOrMod
79 final.haskell-nix.haskellLib.versionOrModToMods versionOrMod
80− ++ [{ inherit compiler-nix-name name; }]
80+ ++ [(lib.mapAttrs (_: lib.mkOverride 1100) { inherit compiler-nix-name name; })]
81 );
81 );
82
82
83+ # tool with a default evalPackages to use.
83− tools = evalPackages: compiler-nix-name:
84+ tool' = evalPackages: compiler-nix-name: name: versionOrMod:
84− lib.mapAttrs (name: versionOrMod:
85 final.haskell-nix.hackage-tool (
85 final.haskell-nix.hackage-tool (
86 final.haskell-nix.haskellLib.versionOrModToMods versionOrMod
86 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);
88}; }
92}; }