nix/tests/config.nix.in

21 lines
478 B
Nix
Raw Normal View History

with import <nix/config.nix>;
rec {
inherit shell;
path = coreutils;
2019-05-07 21:22:47 +00:00
system = "@system@";
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 {}; };
}