Skip to content
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*: Support nixpkgsArgs for all release-*.nix files #97790

Merged
merged 1 commit into from Sep 16, 2020

Conversation

@Infinisil
Copy link
Member

Infinisil commented Sep 11, 2020

Motivation for this change

This is a bit dirty because there's no easy way to propagate these function arguments while still allowing --arg from the command line. But at least you can now pass nixpkgsArgs for release-small.nix and co.

Things done
  • Checked that the modified files still evaluate with nix-instantiate <file> -A <TAB>
This is a bit dirty because there's no easy way to propagate these
function arguments while still allowing --arg from the command line
@grahamc
Copy link
Member

grahamc commented Sep 11, 2020

It would be neat if this function signature and its defaults could be written down in one place, but otherwise nice.

@Infinisil
Copy link
Member Author

Infinisil commented Sep 11, 2020

Yeah, that's a bit unfortunate, because we can't remove the nixpkgsArgs argument from these functions, because otherwise you can't pass --arg nixpkgsArgs .... But we also can't remove the default because then passing it isn't optional. And we also can't change the default to e.g. null because then that would be propagated to release-lib.nix, but that's not a valid value. And we also can't just use @args to capture all arguments and pass them on because then --arg doesn't work again. I think the only thing that might work is some logic to detect if the parameters are passed, and only then propagate them. But that's probably more code than just copy pasting this one default around. Sooo yeah.

@grahamc grahamc merged commit 6e98b8f into NixOS:master Sep 16, 2020
16 checks passed
16 checks passed
tests tests
Details
action
Details
Evaluation Performance Report Evaluator Performance Report
Details
Wait for ofborg
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c1e96ff"; rev="c1e96ff74f8abf0453f76bdffc827f15c887190d"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c1e96ff"; rev="c1e96ff74f8abf0453f76bdffc827f15c887190d"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c1e96ff"; rev="c1e96ff74f8abf0453f76bdffc827f15c887190d"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c1e96ff"; rev="c1e96ff74f8abf0453f76bdffc827f15c887190d"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c1e96ff"; rev="c1e96ff74f8abf0453f76bdffc827f15c887190d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c1e96ff"; rev="c1e96ff74f8abf0453f76bdffc827f15c887190d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c1e96ff"; rev="c1e96ff74f8abf0453f76bdffc827f15c887190d"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.