summaryrefslogtreecommitdiffstats
path: root/tests/config.nix.in
diff options
context:
space:
mode:
Diffstat (limited to 'tests/config.nix.in')
-rw-r--r--tests/config.nix.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/config.nix.in b/tests/config.nix.in
new file mode 100644
index 000000000..51aed539c
--- /dev/null
+++ b/tests/config.nix.in
@@ -0,0 +1,18 @@
+rec {
+ shell = "@bash@";
+
+ path = "@coreutils@";
+
+ system = builtins.currentSystem;
+
+ shared = builtins.getEnv "_NIX_TEST_SHARED";
+
+ mkDerivation = args:
+ derivation ({
+ inherit system;
+ builder = shell;
+ args = ["-e" args.builder or (builtins.toFile "builder.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
+ PATH = path;
+ } // removeAttrs args ["builder" "meta"])
+ // { meta = args.meta or {}; };
+}