Skip to content

Commit bd2866b

Browse files
authored
Fix cross compilation shells (#2393)
1 parent 76bdb3e commit bd2866b

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

overlays/haskell.nix

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -838,18 +838,13 @@ final: prev: {
838838
shellFor' = crossPlatforms:
839839
let
840840
shellArgs = builtins.removeAttrs rawProject.args.shell [ "crossPlatforms" ];
841-
# These are the args we will pass to the shells for the corss compiler
842-
argsCross =
843-
# These things should match main shell
844-
final.lib.filterAttrs (n: _: builtins.elem n [
845-
"packages" "components" "additional" "exactDeps" "packageSetupDeps"
846-
]) shellArgs // {
847-
# The main shell's hoogle will probably be faster to build.
848-
withHoogle = false;
849-
};
850841
# Shells for cross compilation
851-
crossShells = builtins.map (project: project.shellFor' (_p: []) argsCross)
852-
(crossPlatforms projectCross);
842+
crossShells = builtins.map (project: project.shellFor {
843+
# Prevent recursion
844+
crossPlatforms = final.lib.mkForce (_p: []);
845+
# The main shell's hoogle will probably be faster to build.
846+
withHoogle = final.lib.mkForce false;
847+
}) (crossPlatforms projectCross);
853848
in rawProject.hsPkgs.shellFor (shellArgs // {
854849
# Add inputs from the cross compilation shells
855850
inputsFrom = shellArgs.inputsFrom or [] ++ crossShells;
@@ -1158,7 +1153,7 @@ final: prev: {
11581153
let
11591154
ghc = final.buildPackages.haskell-nix.compiler.${compiler-nix-name}.override { hadrianEvalPackages = evalPackages; };
11601155
in
1161-
final.recurseIntoAttrs ({
1156+
final.recurseIntoAttrs ({
11621157
# Things that require no IFD to build
11631158
source-pin-hackage = hackageSrc;
11641159
source-pin-stackage = stackageSrc;

0 commit comments

Comments
 (0)