aboutsummaryrefslogtreecommitdiff
path: root/src/legacy/buildenv.nix
diff options
context:
space:
mode:
authorjade <lix@jade.fyi>2024-10-09 20:37:58 +0000
committerGerrit Code Review <gerrit@localhost>2024-10-09 20:37:58 +0000
commit9865ebaaa618d82a7b7fdccc636cbaa7dfa42427 (patch)
treeb79db30394a892e7e6b7e0a2f966081b4a366590 /src/legacy/buildenv.nix
parent7f7a38f2788ba7fa46cf38127f525700cf63e153 (diff)
parentb63d4a0c622fa556695e7666b9b3bde920904920 (diff)
Merge "Remove static initializers for `RegisterLegacyCommand`" into main
Diffstat (limited to 'src/legacy/buildenv.nix')
-rw-r--r--src/legacy/buildenv.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/legacy/buildenv.nix b/src/legacy/buildenv.nix
new file mode 100644
index 000000000..c8955a94e
--- /dev/null
+++ b/src/legacy/buildenv.nix
@@ -0,0 +1,27 @@
+{ derivations, manifest }:
+
+derivation {
+ name = "user-environment";
+ system = "builtin";
+ builder = "builtin:buildenv";
+
+ inherit manifest;
+
+ # !!! grmbl, need structured data for passing this in a clean way.
+ derivations = map (
+ d:
+ [
+ (d.meta.active or "true")
+ (d.meta.priority or 5)
+ (builtins.length d.outputs)
+ ]
+ ++ map (output: builtins.getAttr output d) d.outputs
+ ) derivations;
+
+ # Building user environments remotely just causes huge amounts of
+ # network traffic, so don't do that.
+ preferLocalBuild = true;
+
+ # Also don't bother substituting.
+ allowSubstitutes = false;
+}