-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
First class cross #13073
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
base: master
Are you sure you want to change the base?
First class cross #13073
Conversation
d2c4405
to
281f6a8
Compare
flake.nix
Outdated
) (renameSplicesFrom "pkgs" pkgs); | ||
nixDependenciesSplices = mapSplices ( | ||
pkgs': (packageSetsFor (args // { pkgs = pkgs'; })).nixDependencies | ||
) (renameSplicesFrom "pkgs" pkgs); | ||
|
||
# A new scope, so that we can use `callPackage` to inject our own interdependencies | ||
# without "polluting" the top level "`pkgs`" attrset. | ||
# This also has the benefit of providing us with a distinct set of packages | ||
# we can iterate over. | ||
# The `2` suffix is here because otherwise it interferes with `nixVersions.latest`, which is used in daemon compat tests. |
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.
This comment is now stale, right?
# The 2 suffix is here
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.
Yes, thanks. It's not in overlayFor
, but here it is stale. The rest of the flake could perhaps move away from using overlayFor
as a vehicle for storing its stuff, but that's somewhat of a large change for later.
This was carefully refactored by inlining some Nixpkgs definitions like `generateSplicesForMkScope`, so the memoization properties should remain the same.
Users can access these through the `lib.makeComponents` return value, so it's helpful to briefly explain some of them. This doesn't replace `meta.description`, but supplements it. (TODO: improve `meta.description`)
We should keep users' pkgs tidy.
281f6a8
to
d2227af
Compare
Motivation
Cross packaging shouldn't depend on having and using overlay.
This PR makes it possible to cross-compile without using any overlays whatsoever.
The three helper functions could perhaps be moved to Nixpkgs lib. cc @Ericson2314
See also commit messages.
Context
The packaging problems in hydra and flake.lock: Update Nixpkgs #13010 motivated me to try improve this again.
This must have been my third attempt at this. I had previously got stuck on a Nixpkgs quirk; see comment at
fixup =
.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.