mirror of
https://github.com/NixOS/nix
synced 2025-07-08 15:13:55 +02:00
Add basic flake tests
This commit is contained in:
parent
ddd42b7e94
commit
2d5a219688
6 changed files with 126 additions and 4 deletions
20
tests/config.nix.in
Normal file
20
tests/config.nix.in
Normal file
|
@ -0,0 +1,20 @@
|
|||
with import <nix/config.nix>;
|
||||
|
||||
rec {
|
||||
inherit shell;
|
||||
|
||||
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.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
|
||||
PATH = path;
|
||||
} // removeAttrs args ["builder" "meta"])
|
||||
// { meta = args.meta or {}; };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue