-
-
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
pkgs/top-level: use lib.systems.equals for crossSystem #254763
Conversation
See also #237427 I think setting |
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.
Looks like a good improvement.
Could you add a test? We have some in pkgs/test
. Not sure about the best place. This might take a new kind of test that warrants its own file. pkgs/test/top-level/default.nix
? You could write some assert
expressions and end with a pkgs.emptyFile
so that it's nix-build
-able.
6a549d3
to
26dd291
Compare
@roberth, added tests, |
a62e776
to
110b8cb
Compare
Fixes otherwise equivalent systems being treated as different by packages that compare `stdenv.*Platform`s using `==` operator.
110b8cb
to
d4063e0
Compare
This might be too pendantic, but I wonder if tests that instantiate all of Nixpkgs are more meta and therefore should be imported into (Basically the same issue I have with |
@Ericson2314 I kinda agree, but this is the pattern we have, and let's solve one problem at a time. Also @ofborg build tests.top-level |
Successfully created backport PR for |
Git push to origin failed for release-23.05 with exitcode 1 |
I don't get this change. If I also thought we had the long term goal of making native compilation being the same as cross compilation, i.e. always cross compiling. If we can't even trigger the “native cross” code path anymore due to this check, it's sort of hard to do any work towards it or play around with it. |
IIRC the problem solved here was that this code relied on a rather unpredictable equality check, making the invocation of Nixpkgs very delicate when it comes to the exact identity (or value address if you will) of the values that are passed in for local and cross. This is basically never a thing in a language that's mostly referentially transparent under its own
I'm sorry that this change broke your workflow, but I think this is still the right behavior, and we should solve the problem you describe explicitly. I agree that unifying the native and cross code paths should be a goal (with the possible exception of splicing being slower than no splicing), so until we have achieved that it should definitely be possible to experiment with that code path. |
Description of changes
Fixes otherwise equivalent systems being treated as different by packages that compare
stdenv.*Platform
s using==
operator.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/
)