-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
haskell infra: Use splicing like normal callPackage
#43264
Conversation
Otherwise extra packages in scope can't be made to work for cross. As much as I think splicing is an evil trick, I think it's best to do this and at least have it work consistently for now. It would seems simpler to expose a `newScopeWithSplicing`, but there's a few attrs (like `buildPackages` or `buildHaskellPackages`) that shouldn't be spliced. Users should instead splice, override the splicing on those packages, and apply `newScope` to that.
pkgsHostHost = {}; | ||
pkgsHostTarget = scope; | ||
pkgsTargetTarget = {}; | ||
} // { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a parenthesis around pkgs.splicePackages {...}
to make it more clear. I think that's how the precedence works but it is sometimes unclear whether this is (pkgs.splicePackages {...}) // {...}
or pkgs.splicePackages ({...} // {...})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's just all the Haskell, but I find function application before operators one of the few precedence rules I do remember 😁.
These should all come from `buildHaskellPackages`
And because of all the problems with max args lately, let me say this preserves hashes in the native case and thus is fine. |
Cool! So, does it mean that my concerns about |
@kirelagin hehe not quite! https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/make-package-set.nix#L111 prevents splicing on |
Errr and what is the purpose of preventing splicing on |
Because it already functions as the If every package used the actual |
Motivation for this change
This ensures all tools and
setup-depends
are drawn frombuildHaskellPackages
, the equivalent ofbuildPackages
, so that they run on the build system as intended.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)CC @kirelagin