lix/tests/config.nix.in

19 lines
467 B
Nix
Raw Normal View History

rec {
shell = "@bash@";
path = "@coreutils@";
2020-03-24 13:26:13 +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-${args.name}.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
PATH = path;
} // removeAttrs args ["builder" "meta"])
// { meta = args.meta or {}; };
}