DynamicRunCommand: don't run if the build failed
This commit is contained in:
@ -127,4 +127,22 @@ rec {
|
||||
];
|
||||
};
|
||||
|
||||
runCommandHook.failed = mkDerivation {
|
||||
name = "failed";
|
||||
builder = "/bin/sh";
|
||||
outputs = [ "out" ];
|
||||
args = [
|
||||
(
|
||||
builtins.toFile "builder.sh" ''
|
||||
#! /bin/sh
|
||||
|
||||
touch $out
|
||||
chmod +x $out
|
||||
|
||||
exit 1
|
||||
''
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user