forked from lix-project/hydra
28 lines
583 B
Nix
28 lines
583 B
Nix
|
with import ./config.nix;
|
||
|
{
|
||
|
runCommandHook.example = mkDerivation
|
||
|
{
|
||
|
name = "my-build-product";
|
||
|
builder = "/bin/sh";
|
||
|
outputs = [ "out" "bin" ];
|
||
|
args = [
|
||
|
(
|
||
|
builtins.toFile "builder.sh" ''
|
||
|
#! /bin/sh
|
||
|
|
||
|
echo "$PATH"
|
||
|
|
||
|
mkdir $bin
|
||
|
echo "foo" > $bin/bar
|
||
|
|
||
|
metrics=$out/nix-support/hydra-metrics
|
||
|
mkdir -p "$(dirname "$metrics")"
|
||
|
echo "lineCoverage 18 %" >> "$metrics"
|
||
|
echo "maxResident 27 KiB" >> "$metrics"
|
||
|
''
|
||
|
)
|
||
|
];
|
||
|
};
|
||
|
|
||
|
}
|