-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
release-cross.nix: fix cross bootstrap tools eval #176901
Conversation
I would rather not use If we want some sort of memoization maybe we can factor that out, e.g. into a new |
I strongly disagree. You need cross compiled derivations to be accessible inside the package set, because sometimes (not often, but sometimes) you have a package that depends on specifically the static version of another package, or a cross-compiled version. Additionally, in all-packages.nix there are a bunch of packages using |
There are a few exception, which is why getting rid of To be clear you wouldn't do that, but I wouldn't want people to read the code and get the wrong impression. Thinking and reading a bit more, In this case, we are making a regular package set for no other reason than to get |
This has been deprecated for a long time, and it's doubtful it had any users to start with. And having an undisablable warning when enumarating platforms is not good.
I've pushed an implementation using release-lib. The |
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.
Thanks!
I'm a bit late to the discussion here, but...
Does this dislike extend to I always thought of
Manually-coded enumeration bothers me too. Unfortunately because so much software needs Rosetta Stones we can't really avoid having a manual enumeration for each of the four non-vendor components of a multiarch tuple: cpu-and-mode, kernel, libc, abi. Would it still make you nervous if Unfortunately nix doesn't have a high-precedence postfix function application operator. If people have to write |
The bigger problem is that this needs to be recomputed everytime it is used. Nix can share eval work for attributes, but doesn't memoize functions. |
I think that's the left inverse of
Oh wow, yes, that is gross. And unexpected.
Hrm, I thought it did. I guess this changed? From edolstra's thesis, section 4.4:
I think the LISP people call this "hash consing". |
This is only the case for variable bindings, attribute sets etc. Functions behave like this (utilising the fact that
It's both: |
Description of changes
In #175484, I changed pkgs/stdenv/linux/make-bootstrap-tools.nix
to take a package set instead of system and localSystem arguments, but
I forgot to update make-bootstrap-tools-cross.nix.
Now that we have a package set in make-bootstrap-tools-cross.nix, we
can use pkgsCross to avoid full re-evaluations of Nixpkgs for each
platform.
I'm not sure why release-cross.nix hardcodes the build system to
x86_64-linux, so I've left that as-is.
Fixes: 5643714 ("stdenvBootstrapTools: inherit {cross,local}System")
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes