aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/flake/flake.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-01-29 23:12:58 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-01-29 23:14:27 +0100
commitb9fb3720750a24d8b2fbe6b1491696d6a51dcff3 (patch)
tree27bef94799d20261c9b49e43bbcd1907a107fde9 /src/libexpr/flake/flake.hh
parent88b44b1e94735710853bdabb6904073bc77f2ccb (diff)
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.
Diffstat (limited to 'src/libexpr/flake/flake.hh')
-rw-r--r--src/libexpr/flake/flake.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libexpr/flake/flake.hh b/src/libexpr/flake/flake.hh
index 355e22adc..fd03faf13 100644
--- a/src/libexpr/flake/flake.hh
+++ b/src/libexpr/flake/flake.hh
@@ -78,7 +78,12 @@ struct LockFlags
allowed. */
bool allowMutable = true;
+ /* Flake inputs to be overriden. */
std::map<InputPath, FlakeRef> inputOverrides;
+
+ /* Flake inputs to be updated. This means that any existing lock
+ for those inputs will be ignored. */
+ std::set<InputPath> inputUpdates;
};
LockedFlake lockFlake(