diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-04-03 19:28:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 19:28:09 +0200 |
commit | 81491e1379138e69138e30d18210badbd0765b89 (patch) | |
tree | 9cc39191b610d51117815d499cfef2a59cd2000a /src/libcmd/installables.cc | |
parent | acc33143766f74ebeca808812e2d01e2e4d73269 (diff) | |
parent | 3c3bd0767f70309417999ebfa34cb89cc78d4a3e (diff) |
Merge pull request #8042 from lheckemann/alt-lockfiles
Allow specifying alternative paths for reading/writing flake locks
Diffstat (limited to 'src/libcmd/installables.cc')
-rw-r--r-- | src/libcmd/installables.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 67549b280..32ae46d9f 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -103,6 +103,28 @@ MixFlakeOptions::MixFlakeOptions() }); addFlag({ + .longName = "reference-lock-file", + .description = "Read the given lock file instead of `flake.lock` within the top-level flake.", + .category = category, + .labels = {"flake-lock-path"}, + .handler = {[&](std::string lockFilePath) { + lockFlags.referenceLockFilePath = lockFilePath; + }}, + .completer = completePath + }); + + addFlag({ + .longName = "output-lock-file", + .description = "Write the given lock file instead of `flake.lock` within the top-level flake.", + .category = category, + .labels = {"flake-lock-path"}, + .handler = {[&](std::string lockFilePath) { + lockFlags.outputLockFilePath = lockFilePath; + }}, + .completer = completePath + }); + + addFlag({ .longName = "inputs-from", .description = "Use the inputs of the specified flake as registry entries.", .category = category, |