aboutsummaryrefslogtreecommitdiff
path: root/tests/config.nix.in
blob: a57a8c5962e3134d49ef561a4e8cb0a4ffc48eef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
rec {
  shell = "@bash@";

  path = "@coreutils@";

  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 {}; };
}