Skip to content

Commit f3be8f3

Browse files
committedMar 27, 2025
Move hadrian plans into the project roots
1 parent e28fa48 commit f3be8f3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
# for core of haskell.nix E.g. this should always work:
164164
# nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false
165165
roots = forEachSystem (system:
166-
self.legacyPackagesUnstable.${system}.haskell-nix.roots defaultCompiler);
166+
self.legacyPackagesUnstable.${system}.haskell-nix.roots { compiler-nix-name = defaultCompiler; });
167167

168168
# Note: `nix flake check` evaluates outputs for all platforms, and haskell.nix
169169
# uses IFD heavily, you have to have the ability to build for all platforms

‎overlays/haskell.nix

+4-4
Original file line numberDiff line numberDiff line change
@@ -1082,12 +1082,12 @@ final: prev: {
10821082
# are tested and cached. Consider using `p.roots` where `p` is a
10831083
# project as it will automatically match the `compiler-nix-name`
10841084
# of the project.
1085-
roots = { compiler-nix-name, evalPackages ? final.pkgsBuildBuild }: final.linkFarm "haskell-nix-roots-${compiler-nix-name}"
1085+
roots = { compiler-nix-name, evalPackages ? final.pkgsBuildBuild }@args: final.linkFarm "haskell-nix-roots-${compiler-nix-name}"
10861086
(final.lib.filter (x: x.name != "recurseForDerivations")
10871087
(final.lib.mapAttrsToList (name: path: { inherit name path; })
1088-
(roots' compiler-nix-name 2)));
1088+
(roots' args 2)));
10891089

1090-
roots' = { compiler-nix-name, evalPackages ? final.pkgsBuildBuild }: ifdLevel: evalPackages:
1090+
roots' = { compiler-nix-name, evalPackages ? final.pkgsBuildBuild }: ifdLevel:
10911091
let
10921092
ghc = final.buildPackages.haskell-nix.compiler.${compiler-nix-name}.override { hadrianEvalPackages = evalPackages; };
10931093
in
@@ -1099,7 +1099,7 @@ final: prev: {
10991099
inherit (evalPackages) nix gitMinimal nix-prefetch-git;
11001100
} // final.lib.optionalAttrs (final.stdenv.hostPlatform.libc == "glibc") {
11011101
inherit (final) glibcLocales;
1102-
} // pkgs.lib.optionalAttrs (builtins.compareVersions ghc.version "9.4" >= 0) {
1102+
} // final.lib.optionalAttrs (builtins.compareVersions ghc.version "9.4" >= 0) {
11031103
# Make sure the plan for hadrian is cached (we need it to instanciate ghc).
11041104
hadrian-plan = final.buildPackages.haskell-nix.compiler.${compiler-nix-name}.hadrianProject.plan-nix;
11051105
# Also include the same plan evaluated on the eval system.

0 commit comments

Comments
 (0)
Please sign in to comment.