aboutsummaryrefslogtreecommitdiff
path: root/src/legacy/user-env.hh
diff options
context:
space:
mode:
authorRebecca Turner <rbt@sent.as>2024-09-10 13:13:19 -0700
committerRebecca Turner <rbt@sent.as>2024-10-01 16:08:58 -0700
commitb63d4a0c622fa556695e7666b9b3bde920904920 (patch)
tree48f4df7f13c1908f943f45be0c6f5c9c56252d6a /src/legacy/user-env.hh
parent775292766025380d04004e42fefbdb8ca40b3fa3 (diff)
Remove static initializers for `RegisterLegacyCommand`
This moves the "legacy"/"nix2" commands under a new `src/legacy/` directory, instead of being scattered around in a bunch of different directories. A new `liblegacy` build target is defined, and the `nix` binary is linked against it. Then, `RegisterLegacyCommand` is replaced with `LegacyCommand::add` calls in functions like `registerNixCollectGarbage()`. These registration functions are called explicitly in `src/nix/main.cc`. See: https://git.lix.systems/lix-project/lix/issues/359 Change-Id: Id450ffc3f793374907599cfcc121863b792aac1a
Diffstat (limited to 'src/legacy/user-env.hh')
-rw-r--r--src/legacy/user-env.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/legacy/user-env.hh b/src/legacy/user-env.hh
new file mode 100644
index 000000000..af45d2d85
--- /dev/null
+++ b/src/legacy/user-env.hh
@@ -0,0 +1,14 @@
+#pragma once
+///@file
+
+#include "get-drvs.hh"
+
+namespace nix {
+
+DrvInfos queryInstalled(EvalState & state, const Path & userEnv);
+
+bool createUserEnv(EvalState & state, DrvInfos & elems,
+ const Path & profile, bool keepDerivations,
+ const std::string & lockToken);
+
+}