about summary refs log tree commit diff
path: root/tests/config.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/config.nix')
-rw-r--r--tests/config.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/config.nix b/tests/config.nix
new file mode 100644
index 000000000000..6244a15fa48a
--- /dev/null
+++ b/tests/config.nix
@@ -0,0 +1,20 @@
+with import <nix/config.nix>;
+
+rec {
+  inherit shell;
+
+  path = coreutils;
+
+  system = builtins.currentSystem;
+
+  shared = builtins.getEnv "_NIX_TEST_SHARED";
+
+  mkDerivation = args:
+    derivation ({
+      inherit system;
+      builder = shell;
+      args = ["-e" args.builder];
+      PATH = path;
+    } // removeAttrs args ["builder" "meta"])
+    // { meta = args.meta or {}; };
+}