Skip to content

Remove internal deps on default ghc and stackage #738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
904dd76
Remove internal deps on default ghc and stackage
hamishmack Jul 1, 2020
fe86dcf
Merge remote-tracking branch 'origin/master' into hkm/avoid-defaults
hamishmack Jul 1, 2020
ee0cbc4
ifdLevel 1
hamishmack Jul 1, 2020
e22fff7
Set `"builtin": false` in sources.json
hamishmack Jul 1, 2020
f0a1490
Use nixpkgs instead of nixpkgs-default for niv
hamishmack Jul 1, 2020
eeff15e
Use nixpkgs instead of nixpkgs-default for niv
hamishmack Jul 2, 2020
30df20a
ifdLevel 2
hamishmack Jul 2, 2020
482a1a1
ifdLevel 3
hamishmack Jul 2, 2020
b367bf2
Update tests to make compiler-nix-name explicit
hamishmack Jul 3, 2020
52793cf
Fix for cabal-install on ghc 8.10.1
hamishmack Jul 3, 2020
70f7775
Fix build.nix
hamishmack Jul 3, 2020
dd704bd
Fix test
hamishmack Jul 3, 2020
cf4eeff
Add missing compiler-nix-name in ci.nix
hamishmack Jul 3, 2020
46fd628
Better warnings
hamishmack Jul 6, 2020
275e162
Merge master into hkm/avoid-defaults
hamishmack Jul 6, 2020
caa940f
Better warnings
hamishmack Jul 6, 2020
ba4e38e
Remove redundant tests
hamishmack Jul 6, 2020
d41b1c8
Add default for ./test/test.sh on buildkite
hamishmack Jul 6, 2020
926766a
Add cabal-nix-name default for buildkite tests
hamishmack Jul 6, 2020
da181b4
Add compiler-nix-name to script functions
hamishmack Jul 6, 2020
b30a9a1
Fix extra-hackage buildkite test
hamishmack Jul 6, 2020
de8cbb7
Check the materialization
hamishmack Jul 6, 2020
10055a1
Fix materialization
hamishmack Jul 6, 2020
74935bc
Fix eval time warnings
hamishmack Jul 6, 2020
bc2e42c
Fix hydra eval (maybe)
hamishmack Jul 6, 2020
1903f33
Materialization fixes
hamishmack Jul 6, 2020
1ef36f3
Another materialization fix
hamishmack Jul 6, 2020
7461041
Switch checkMaterialization off (tests passed)
hamishmack Jul 6, 2020
0661b4e
Update getting-started
hamishmack Jul 6, 2020
757b9a4
Remove deprecated code
hamishmack Jul 7, 2020
dfc49e2
Remove ./nixpkgs
hamishmack Jul 7, 2020
855089e
Remove ./nixpkgs
hamishmack Jul 7, 2020
c1bf1a3
Reenable call-stack-to-nix ifdInput test
hamishmack Jul 7, 2020
18311c4
Merge remote-tracking branch 'origin/master' into hkm/avoid-defaults
hamishmack Jul 7, 2020
4ec19da
Documentation and explicit test compiler-nix-names
hamishmack Jul 8, 2020
c0b401b
Add missing \
hamishmack Jul 8, 2020
7c1453c
Add compiler-nix-name for maintainer scripts test
hamishmack Jul 8, 2020
cb3d1c0
Move compiler-nix-name to the right command
hamishmack Jul 8, 2020
1be5755
Merge remote-tracking branch 'origin/master' into hkm/avoid-defaults
hamishmack Jul 8, 2020
b9345d2
Fix test
hamishmack Jul 8, 2020
4cebce4
Expand comment
hamishmack Jul 8, 2020
21fb517
Fix docs for callCabalProjectToNix
hamishmack Jul 8, 2020
eba7f1e
Set date
hamishmack Jul 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ in
, nixpkgsArgs ? haskellNix.nixpkgsArgs
, pkgs ? import nixpkgs nixpkgsArgs
, ifdLevel ? 1000
, compiler-nix-name ? "ghc865"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be the same as any of the other versions? When can we upgrade it?

}:

let
haskell = pkgs.haskell-nix;
buildHaskell = pkgs.buildPackages.haskell-nix;
tool = buildHaskell.tool;
tool = buildHaskell.tool';
in rec {
tests = import ./test/default.nix { inherit pkgs ifdLevel; };
tests = import ./test/default.nix { inherit pkgs ifdLevel compiler-nix-name; };

tools = pkgs.lib.optionalAttrs (ifdLevel >= 3) (
pkgs.recurseIntoAttrs {
ghcide-020 = tool "ghcide" "0.2.0";
} // pkgs.lib.optionalAttrs (buildHaskell.defaultCompilerNixName == "ghc865") {
cabal-30 = tool "cabal" "3.0.0.0";
} // pkgs.lib.optionalAttrs (buildHaskell.defaultCompilerNixName != "ghc8101") {
cabal-32 = tool "cabal" "3.2.0.0";
ghcide-object-code = tool "ghcide" "object-code";
ghcide-020 = tool compiler-nix-name "ghcide" "0.2.0";
cabal-32 = tool compiler-nix-name "cabal" "3.2.0.0";
} // pkgs.lib.optionalAttrs (compiler-nix-name != "ghc8101") {
ghcide-object-code = tool compiler-nix-name "ghcide" "object-code";
}
);

Expand All @@ -34,8 +33,8 @@ in rec {
# as not all of them can work in restricted eval mode (as they
# are not pure).
maintainer-scripts = pkgs.dontRecurseIntoAttrs {
update-hackage = haskell.callPackage ./scripts/update-hackage.nix {};
update-stackage = haskell.callPackage ./scripts/update-stackage.nix {};
update-hackage = haskell.callPackage ./scripts/update-hackage.nix { inherit compiler-nix-name; };
update-stackage = haskell.callPackage ./scripts/update-stackage.nix { inherit compiler-nix-name; };
update-pins = haskell.callPackage ./scripts/update-pins.nix {};
update-docs = pkgs.buildPackages.callPackage ./scripts/update-docs.nix {
generatedOptions = pkgs.callPackage ./scripts/options-doc.nix { };
Expand All @@ -47,11 +46,10 @@ in rec {
# use)
check-hydra = pkgs.buildPackages.callPackage ./scripts/check-hydra.nix {};
check-closure-size = pkgs.buildPackages.callPackage ./scripts/check-closure-size.nix {
# Includes cabal-install and hpack since these are commonly used.
# Includes cabal-install since this is commonly used.
nix-tools = pkgs.linkFarm "common-tools" [
{ name = "nix-tools"; path = haskell.nix-tools; }
{ name = "cabal-install"; path = haskell.cabal-install; }
{ name = "hpack"; path = haskell.haskellPackages.hpack.components.exes.hpack; }
{ name = "nix-tools"; path = haskell.nix-tools.${compiler-nix-name}; }
{ name = "cabal-install"; path = haskell.cabal-install.${compiler-nix-name}; }
];
};
check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};
Expand Down
6 changes: 3 additions & 3 deletions builder/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, fetchurl, pkgconfig, nonReinstallablePkgs, hsPkgs }:
{ pkgs, buildPackages, stdenv, lib, haskellLib, ghc, fetchurl, pkgconfig, nonReinstallablePkgs, hsPkgs, compiler }:

let
# Builds a single component of a package.
Expand Down Expand Up @@ -45,6 +45,7 @@ let
hoogleLocal = let
nixpkgsHoogle = import (pkgs.path + /pkgs/development/haskell-modules/hoogle.nix);
in { packages ? [], hoogle ? pkgs.buildPackages.haskell-nix.tool "hoogle" {
compiler-nix-name = compiler.nix-name;
version = "5.0.17.15";
index-state = pkgs.haskell-nix.internalHackageIndexState;
}
Expand All @@ -59,9 +60,8 @@ let

# Same as haskellPackages.shellFor in nixpkgs.
shellFor = haskellLib.weakCallPackage pkgs ./shell-for.nix {
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib buildPackages;
inherit hsPkgs ghcForComponent makeConfigFiles hoogleLocal haskellLib buildPackages compiler;
inherit (buildPackages) glibcLocales;
buildGHC = ghc.passthru.buildGHC or ghc;
};

# Same as haskellPackages.ghcWithPackages and ghcWithHoogle in nixpkgs.
Expand Down
4 changes: 2 additions & 2 deletions builder/shell-for.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, buildGHC }:
{ lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, compiler }:

{ packages ? ps:
let
Expand Down Expand Up @@ -94,7 +94,7 @@ in
nativeBuildInputs = [ ghcEnv ]
++ nativeBuildInputs
++ mkDrvArgs.nativeBuildInputs or []
++ lib.attrValues (buildPackages.haskell-nix.toolsForGhc buildGHC tools);
++ lib.attrValues (buildPackages.haskell-nix.tools' compiler.nix-name tools);
phases = ["installPhase"];
installPhase = "echo $nativeBuildInputs $buildInputs > $out";
LANG = "en_US.UTF-8";
Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
This file contains a summary of changes to Haskell.nix and `nix-tools`
that will impact users.

## July ?, 2019
* Removes most internal use of defaultCompilerNixName and adds warnings
advising how to do the same to code that uses haskell.nix.
Code using `haskell-nix` attributes `cabal-install`, `nix-tools`, `alex`,
`happy` must be updated to use one of `haskell-nix.cabal-install.ghc865`,
`p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`

## June 25, 2019
* Haddock docs are now built in their own derivation when needed (not as part
of the component build).
Expand Down
28 changes: 14 additions & 14 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"R1909" = "nixpkgs-1909";
"R2003" = "nixpkgs-2003";
};
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (defaultCompilerNixName: _:
(import ./default.nix { inherit checkMaterialization defaultCompilerNixName; }).nixpkgsArgs) ({
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (compiler-nix-name: _:
(import ./default.nix { inherit checkMaterialization; }).nixpkgsArgs) ({
ghc865 = {};
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2003") {
ghc883 = {};
Expand All @@ -24,11 +24,11 @@
linux = "x86_64-linux";
darwin = "x86_64-darwin";
};
crossSystems = nixpkgsName: nixpkgs: compilerNixName: system:
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name: system:
# We need to use the actual nixpkgs version we're working with here, since the values
# of 'lib.systems.examples' are not understood between all versions
let lib = nixpkgs.lib;
in lib.optionalAttrs (system == "x86_64-linux" && compilerNixName != "ghc8101") {
in lib.optionalAttrs (system == "x86_64-linux" && compiler-nix-name != "ghc8101") {
# Windows cross compilation is currently broken on macOS
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (system == "x86_64-linux") {
Expand All @@ -41,32 +41,32 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
# We need this for generic nixpkgs stuff at the right version
genericPkgs = import pinnedNixpkgsSrc {};
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compilerNixName: nixpkgsArgs:
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compiler-nix-name: nixpkgsArgs:
dimension "System" (systems genericPkgs) (systemName: system:
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
build = import ./build.nix { inherit pkgs ifdLevel; };
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };
platformFilter = platformFilterGeneric pkgs system;
in filterAttrsOnlyRecursive (_: v: platformFilter v) {
# Native builds
# TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
native = pkgs.recurseIntoAttrs ({
inherit (build) tests tools maintainer-scripts maintainer-script-cache;
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
ghc = pkgs.buildPackages.haskell-nix.compiler."${compiler-nix-name}";
} // pkgs.lib.optionalAttrs (ifdLevel >= 1) {
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
iserv-proxy = pkgs.ghc-extra-packages."${compiler-nix-name}".iserv-proxy.components.exes.iserv-proxy;
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
});
}
//
dimension "Cross system" (crossSystems nixpkgsName genericPkgs compilerNixName system) (crossSystemName: crossSystem:
dimension "Cross system" (crossSystems nixpkgsName genericPkgs compiler-nix-name system) (crossSystemName: crossSystem:
# Cross builds
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
build = import ./build.nix { inherit pkgs ifdLevel; };
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };
in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) {
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
ghc = pkgs.buildPackages.haskell-nix.compiler."${compiler-nix-name}";
# TODO: look into cross compiling ghc itself
# ghc = pkgs.haskell-nix.compiler."${compilerNixName}";
# ghc = pkgs.haskell-nix.compiler."${compiler-nix-name}";
# TODO: look into making tools work when cross compiling
# inherit (build) tools;
# Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
Expand All @@ -78,8 +78,8 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
inherit (build.tests) haskellNixRoots;
};
} // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
remote-iserv = pkgs.ghc-extra-packages."${compilerNixName}".remote-iserv.components.exes.remote-iserv;
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
remote-iserv = pkgs.ghc-extra-packages."${compiler-nix-name}".remote-iserv.components.exes.remote-iserv;
iserv-proxy = pkgs.ghc-extra-packages."${compiler-nix-name}".iserv-proxy.components.exes.iserv-proxy;
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
})
Expand Down
19 changes: 13 additions & 6 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
let haskellNix = {
checkMaterialization ? false, # Allows us to easily switch on materialization checking
defaultCompilerNixName ? null, # Quick way to override the default compiler e.g. "ghc883"
system ? builtins.currentSystem,
sourcesOverride ? {},
... }@args: rec {
sources = (import ./nix/sources.nix) // sourcesOverride;
sources = { nixpkgs-default = sources.nixpkgs; }
// (import ./nix/sources.nix)
// sourcesOverride;

config = import ./config.nix;
overlays = [ allOverlays.combined ] ++ (
Expand All @@ -18,16 +19,23 @@ let haskellNix = {
)]
else []
) ++ (
if defaultCompilerNixName != null
if args ? defaultCompilerNixName
then [(
final: prev: {
haskell-nix = prev.haskell-nix // {
inherit defaultCompilerNixName;
userCompilerNixName = args.defaultCompilerNixName;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be tempted to just drop it and make this an error...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need something to make the tests work though. I quite like the idea of replacing this with something like:

haskell-nix = prev.haskell-nix // {
  withGhc = compiler-nix-name: {
    cabalProject = args: final.haskell-nix.cabalProject ({ inherit compiler-nix-name; } // args);
    hackage-package = args: final.haskell-nix.hackage-package ({ inherit compiler-nix-name; } // args);
    ...
  };
};

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do the tests need to set defaultNixName? Shouldn't they all be setting explicit compiler-nix-names for their individual tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I'm going to update all the tests so they do that instead of using defaultCompilerNixName. I was hoping there was a way to avoid that, but @angerman pointed out it is nicer to be explicit here. It makes the tests more useful as examples.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test suite no longer uses defaultCompilerNixName.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the point of that change was so we could then get rid of the userCompilerNixName thing? If we no longer need it for tests then let's just delete it.

The only other reason I can see to keep it is backwards compatibility, but I buy Rodney's argument that that's something of a losing battle anyway and we should just keep a changelog.

};
}
)]
else []
);
) ++ [(
final: prev: {
haskell-nix = prev.haskell-nix // {
inherit overlays;
sources = prev.haskell-nix.sources // sourcesOverride;
};
}
)];
allOverlays = import ./overlays args;
nixpkgsArgs = { inherit config overlays system; };
pkgs = import sources.nixpkgs-default nixpkgsArgs;
Expand All @@ -44,7 +52,6 @@ in haskellNixV1 // {
__functor = _: {
version ? 2,
checkMaterialization ? false, # Allows us to easily switch on materialization checking
defaultCompilerNixName ? null, # Quick way to override the default compiler e.g. "ghc883"
system ? builtins.currentSystem,
sourcesOverride ? {},
... }@args:
Expand Down
19 changes: 10 additions & 9 deletions lib/call-cabal-project-to-nix.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ dotCabal, pkgs, runCommand, nix-tools, cabal-install, ghc, hpack, symlinkJoin, cacert, index-state-hashes, haskellLib, materialize }@defaults:
{ dotCabal, pkgs, runCommand, evalPackages, symlinkJoin, cacert, index-state-hashes, haskellLib, materialize }@defaults:
let readIfExists = src: fileName:
let origSrcDir = src.origSrcSubDir or src;
in
Expand All @@ -17,12 +17,15 @@ in
, cabalProject ? readIfExists src cabalProjectFileName
, cabalProjectLocal ? readIfExists src "${cabalProjectFileName}.local"
, cabalProjectFreeze ? readIfExists src "${cabalProjectFileName}.freeze"
, compiler-nix-name ? null # Nix name of the ghc compiler as a string eg. "ghc883"
, caller ? "callCabalProjectToNix" # Name of the calling funcion for better warning messages
, compiler-nix-name ? # Nix name of the ghc compiler as a string eg. "ghc883"
pkgs.haskell-nix.defaultCompilerNixNameWithWarning (default:
"While building ${if name != null then "${name} " else ""}(using ${default}). "
+ "Please consider adding `compiler-nix-name = \"${default}\";` to the call to `${caller}`.")
, ghc ? null # Deprecated in favour of `compiler-nix-name`
, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping
, nix-tools ? defaults.nix-tools
, hpack ? defaults.hpack
, cabal-install ? defaults.cabal-install
, nix-tools ? evalPackages.haskell-nix.nix-tools.${compiler-nix-name}
, cabal-install ? evalPackages.haskell-nix.cabal-install.${compiler-nix-name}
, configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
# `--enable-tests --enable-benchmarks` are included by default.
# If the tests and benchmarks are not needed and they
Expand Down Expand Up @@ -56,7 +59,6 @@ let
+ "pick the correct `ghc` package from the respective buildPackages. "
+ "For example use `compiler-nix-name = \"ghc865\";` for ghc 8.6.5") ghc
else
if compiler-nix-name != null
# Do note that `pkgs = final.buildPackages` in the `overlays/haskell.nix`
# call to this file. And thus `pkgs` here is the proper `buildPackages`
# set and we do not need, nor should pick the compiler from another level
Expand All @@ -65,8 +67,7 @@ let
#
# > The option `packages.Win32.package.identifier.name' is used but not defined.
#
then pkgs.haskell-nix.compiler."${compiler-nix-name}"
else defaults.ghc;
pkgs.haskell-nix.compiler."${compiler-nix-name}";

in
assert (if ghc'.isHaskellNixCompiler or false then true
Expand Down Expand Up @@ -386,7 +387,7 @@ let
} // pkgs.lib.optionalAttrs (checkMaterialization != null) {
inherit checkMaterialization;
}) (pkgs.evalPackages.runCommand (if name == null then "plan-to-nix-pkgs" else name + "-plan-to-nix-pkgs") {
nativeBuildInputs = [ nix-tools dummy-ghc dummy-ghc-pkg hpack cabal-install pkgs.evalPackages.rsync ];
nativeBuildInputs = [ nix-tools dummy-ghc dummy-ghc-pkg cabal-install pkgs.evalPackages.rsync ];
# Needed or stack-to-nix will die on unicode inputs
LOCALE_ARCHIVE = pkgs.lib.optionalString (pkgs.stdenv.hostPlatform.libc == "glibc") "${pkgs.glibcLocales}/lib/locale/locale-archive";
LANG = "en_US.UTF-8";
Expand Down
3 changes: 2 additions & 1 deletion lib/call-stack-to-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* see also `call-cabal-project-to-nix`!
*/
{ runCommand, nix-tools, pkgs, mkCacheFile, materialize, haskellLib }:
{ runCommand, pkgs, mkCacheFile, materialize, haskellLib }:
{ name ? src.name or null # optional name for better error messages
, src
, stackYaml ? "stack.yaml"
Expand All @@ -15,6 +15,7 @@
, resolverSha256 ? null
, materialized ? null # Location of a materialized copy of the nix files
, checkMaterialization ? null # If true the nix files will be generated used to check plan-sha256 and material
, nix-tools ? pkgs.haskell-nix.nix-tools.${pkgs.haskell-nix.internalDefaultCompilerNixName}
, ... }:
let
inherit (haskellLib.fetchResolver {
Expand Down
4 changes: 3 additions & 1 deletion lib/stack-cache-generator.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generate cache entries for dependencies of package defined in `src`

{ pkgs, haskellLib, nix-tools }:
{ pkgs, haskellLib }:
{ src
, stackYaml ? "stack.yaml"
, sha256map ? null
Expand All @@ -14,6 +14,8 @@
then { location, tag, ...}: sha256map."${location}"."${tag}"
else _: null
, resolverSha256 ? null
, checkMaterialization ? null
, nix-tools ? pkgs.haskell-nix.nix-tools.${pkgs.haskell-nix.internalDefaultCompilerNixName}
, ...
}:
let
Expand Down
Loading