mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
41 lines
671 B
Nix
41 lines
671 B
Nix
# Run:
|
|
# nix-build -A nixosTests.activation-lib
|
|
{
|
|
lib,
|
|
stdenv,
|
|
testers,
|
|
}:
|
|
let
|
|
inherit (lib) fileset;
|
|
|
|
runTests = stdenv.mkDerivation {
|
|
name = "tests-activation-lib";
|
|
src = fileset.toSource {
|
|
root = ./.;
|
|
fileset = fileset.unions [
|
|
./lib.sh
|
|
./test.sh
|
|
];
|
|
};
|
|
buildPhase = ":";
|
|
doCheck = true;
|
|
postUnpack = ''
|
|
patchShebangs --build .
|
|
'';
|
|
checkPhase = ''
|
|
./test.sh
|
|
'';
|
|
installPhase = ''
|
|
touch $out
|
|
'';
|
|
};
|
|
|
|
runShellcheck = testers.shellcheck {
|
|
name = "activation-lib";
|
|
src = runTests.src;
|
|
};
|
|
|
|
in
|
|
lib.recurseIntoAttrs {
|
|
inherit runTests runShellcheck;
|
|
}
|