5ca88bfbb9
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
36 lines
635 B
Nix
36 lines
635 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 {
|
|
src = runTests.src;
|
|
};
|
|
|
|
in
|
|
lib.recurseIntoAttrs {
|
|
inherit runTests runShellcheck;
|
|
}
|