-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
stdenv: fix propagatedUserEnvPkgs when __structuredAttrs is true again #392928
stdenv: fix propagatedUserEnvPkgs when __structuredAttrs is true again #392928
Conversation
This is a follow-up of NixOS#388908. Previously, $out/nix-support/propagated-user-env-packages was not created when __structuredAttrs is true, the first element of propagatedUserEnvPkgs is null and the length of propagatedUserEnvPkgs is at least 2. Fixes NixOS#388829
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.
Ah, I even thought about this part in the fir PR - but then assumed that "nobody is going to pass an empty string as the first pkg anyway, so it should be fine". Didn't think about null
.
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.
LGTM
To err on the safe side before merging, has anyone built and confirmed that it works? I originally planned to test it tonight, but my tablet is temporarily unavailable. |
What attribute do you want tested? I'll spin up a build on my Ampere system at home. |
I would like to see if pkgs.hello.overrideAttrs { __structuredAttrs = true; propagatedUserEnvPkgs = [ null pkgs.bash ]; } built output produces the correct I would be curious about the result for
Thanks a lot! |
Ok it built and only has bash interactive in it.
|
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.
I know little about Emacs and its plugins.
Nevertheless, since stdenv
's setup.sh
works as expected, plut two other approavals, it should be safe to merge.
The issue NixOS#392928 fixes seems to affect many elisp packages. For example, about 900 MELPA packages are affected. This commit is a temporary fix and should be reverted after NixOS#392928 reaches master. Close: NixOS#388829
This is a follow-up of #388908.
Previously,
$out/nix-support/propagated-user-env-packages
was not created when__structuredAttrs
was enabled, the first element ofpropagatedUserEnvPkgs
wasnull
and the length ofpropagatedUserEnvPkgs
was at least 2.Fixes #388829
With this patch applied, condition check result for each
propagatedUserEnvPkgs
is shown below.propagatedUserEnvPkgs
__structuredAttrs
enabled__structuredAttrs
disablednull
false
false
[ ]
false
false
[ null ]
false
false
[ null "foo" ]
true
( previously wasfalse
)true
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.