-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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: make meta.position overridable #295973
Conversation
this is done simply by changing the order in which attrsets are merged with //
6de824c
to
8f28ca6
Compare
I can't judge for the validity of the motivation for this change, but at least there should be a comment about in the code, since this is a very subtle thing which may regress on the next refactoring. If there is the possibility of adding regression tests, that would be even better. |
i feel like if this needs a comment, then so would almost every use of |
@piegamesde thanks for the review btw, is there any chance you could give #294347 a glance too? |
Sorry my capacities are mostly bound elsewhere currently |
ok, thanks anyways |
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.
Yeah, checks out.
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.
Diff LGTM
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 this makes sense. But maybe it would be better to let someone who knows better judge it.
To not let us in a dumb situation like last time (although seemingly not) |
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 think it's pretty self-explanatory; the only sticky situation would be if things further in the //
block would prevent overrides... but they should prevent overrides actually.
This bit:
{
# Expose the result of the checks for everyone to see.
inherit (validity)
unfree
broken
unsupported
insecure
;
available =
validity.valid != "no"
&& (
if config.checkMetaRecursively or false then all (d: d.meta.available or true) references else true
);
}
What do you mean by "should prevent overrides" here? or rather why? |
The five fields that are made consistent in this function are Imagine a derivation with As I understand it, anyway. |
my diff in the related effort #329900 (comment) might be of interest, it should apply here as well |
I'd like to merge this. Mind fixing the merge conflict? |
from my related pr:
As such i'd like an entry into the release notes and some documentation covering this foot-gun |
@pbsds: in the diff you cited, are the following examples of "bad"? -python311Packages.certbot-dns-ovh: ./pkgs/development/python-modules/certbot-dns-ovh/default.nix:37
-python311Packages.certbot-dns-rfc2136: ./pkgs/development/python-modules/certbot-dns-rfc2136/default.nix:35
-python311Packages.certbot-dns-route53: ./pkgs/development/python-modules/certbot-dns-route53/default.nix:35
+python311Packages.certbot-dns-ovh: ./pkgs/development/python-modules/certbot/default.nix:90
+python311Packages.certbot-dns-rfc2136: ./pkgs/development/python-modules/certbot/default.nix:90
+python311Packages.certbot-dns-route53: ./pkgs/development/python-modules/certbot/default.nix:90 -ocamlPackages.json-data-encoding-bson: ./pkgs/development/ocaml-modules/json-data-encoding/bson.nix:19
+ocamlPackages.json-data-encoding-bson: ./pkgs/development/ocaml-modules/json-data-encoding/default.nix:21 -steam-run: ./pkgs/games/steam/fhsenv.nix:344
-steam-run-native: ./pkgs/games/steam/fhsenv.nix:344
-steam-small: ./pkgs/games/steam/fhsenv.nix:313
+steam-run: ./pkgs/games/steam/steam.nix:43
+steam-run-native: ./pkgs/games/steam/steam.nix:43
+steam-small: ./pkgs/games/steam/steam.nix:43 And the following examples of "good"? -vimPlugins.nvim-treesitter-parsers.yaml: ./pkgs/applications/editors/vim/plugins/vim-utils.nix:418
-vimPlugins.nvim-treesitter-parsers.yang: ./pkgs/applications/editors/vim/plugins/vim-utils.nix:418
-vimPlugins.nvim-treesitter-parsers.yuck: ./pkgs/applications/editors/vim/plugins/vim-utils.nix:418
-vimPlugins.nvim-treesitter-parsers.zathurarc: ./pkgs/applications/editors/vim/plugins/vim-utils.nix:418
-vimPlugins.nvim-treesitter-parsers.zig: ./pkgs/applications/editors/vim/plugins/vim-utils.nix:418
+vimPlugins.nvim-treesitter-parsers.yaml: ./pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix:3139
+vimPlugins.nvim-treesitter-parsers.yang: ./pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix:3150
+vimPlugins.nvim-treesitter-parsers.yuck: ./pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix:3161
+vimPlugins.nvim-treesitter-parsers.zathurarc: ./pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix:3172
+vimPlugins.nvim-treesitter-parsers.zig: ./pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix:3183 And the following an example of "meh"? -xaos: ./pkgs/applications/graphics/xaos/default.nix:44
+xaos: ./pkgs/applications/graphics/xaos/default.nix:12 |
correct |
I no longer work on nixpkgs, I deleted my local clone, and my internet connection is prohibitively slow. Sorry, but I'm gonna have to pass this along to someone else. |
Superseded by #359191 |
this is done simply by changing the order in which attrsets are merged with //
fixes #295907
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.