aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/installables.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-04-03 19:28:09 +0200
committerGitHub <noreply@github.com>2023-04-03 19:28:09 +0200
commit81491e1379138e69138e30d18210badbd0765b89 (patch)
tree9cc39191b610d51117815d499cfef2a59cd2000a /src/libcmd/installables.cc
parentacc33143766f74ebeca808812e2d01e2e4d73269 (diff)
parent3c3bd0767f70309417999ebfa34cb89cc78d4a3e (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.cc22
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,