mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
Add --update-input flag to update a specific flake input
Typical usage: $ nix flake update ~/Misc/eelco-configurations/hagbard --update-input nixpkgs to update the 'nixpkgs' input of a flake while leaving every other input unchanged. The argument is an input path, so you can do e.g. '--update-input dwarffs/nixpkgs' to update an input of an input. Fixes #2928.
This commit is contained in:
parent
88b44b1e94
commit
b9fb372075
6 changed files with 76 additions and 15 deletions
|
@ -610,3 +610,10 @@ nix flake update $flake3Dir --override-input flake2/flake1 flake1
|
|||
|
||||
nix flake update $flake3Dir --override-input flake2/flake1 flake1/master/$hash1
|
||||
[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake1.*rev=$hash1 ]]
|
||||
|
||||
# Test --update-input.
|
||||
nix flake update $flake3Dir
|
||||
[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake1.*rev=$hash1 ]]
|
||||
|
||||
nix flake update $flake3Dir --update-input flake2/flake1
|
||||
[[ $(jq .inputs.flake2.inputs.flake1.url $flake3Dir/flake.lock) =~ flake1.*rev=$hash2 ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue