Skip to content

Fix cross compilation shells #2393

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 1 commit into from
Jun 19, 2025
Merged
Changes from all commits
Commits
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
19 changes: 7 additions & 12 deletions overlays/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -832,18 +832,13 @@ final: prev: {
shellFor' = crossPlatforms:
let
shellArgs = builtins.removeAttrs rawProject.args.shell [ "crossPlatforms" ];
# These are the args we will pass to the shells for the corss compiler
argsCross =
# These things should match main shell
final.lib.filterAttrs (n: _: builtins.elem n [
"packages" "components" "additional" "exactDeps" "packageSetupDeps"
]) shellArgs // {
# The main shell's hoogle will probably be faster to build.
withHoogle = false;
};
# Shells for cross compilation
crossShells = builtins.map (project: project.shellFor' (_p: []) argsCross)
(crossPlatforms projectCross);
crossShells = builtins.map (project: project.shellFor {
# Prevent recursion
crossPlatforms = final.lib.mkForce (_p: []);
# The main shell's hoogle will probably be faster to build.
withHoogle = final.lib.mkForce false;
}) (crossPlatforms projectCross);
in rawProject.hsPkgs.shellFor (shellArgs // {
# Add inputs from the cross compilation shells
inputsFrom = shellArgs.inputsFrom or [] ++ crossShells;
Expand Down Expand Up @@ -1152,7 +1147,7 @@ final: prev: {
let
ghc = final.buildPackages.haskell-nix.compiler.${compiler-nix-name}.override { hadrianEvalPackages = evalPackages; };
in
final.recurseIntoAttrs ({
final.recurseIntoAttrs ({
# Things that require no IFD to build
source-pin-hackage = hackageSrc;
source-pin-stackage = stackageSrc;
Expand Down
Loading