2021-02-23 21:10:34 +00:00
|
|
|
with import ./config.nix;
|
|
|
|
{
|
2021-02-24 16:30:33 +00:00
|
|
|
metrics = (
|
|
|
|
mkDerivation {
|
|
|
|
name = "my-build-product";
|
|
|
|
builder = "/bin/sh";
|
|
|
|
outputs = [ "out" "bin" ];
|
|
|
|
args = [
|
|
|
|
(
|
|
|
|
builtins.toFile "builder.sh" ''
|
|
|
|
#! /bin/sh
|
2021-02-23 21:10:34 +00:00
|
|
|
|
2021-02-24 16:30:33 +00:00
|
|
|
echo "$PATH"
|
2021-02-23 21:10:34 +00:00
|
|
|
|
2021-02-24 16:30:33 +00:00
|
|
|
mkdir $bin
|
|
|
|
echo "foo" > $bin/bar
|
2021-02-23 21:10:34 +00:00
|
|
|
|
2021-02-24 16:30:33 +00:00
|
|
|
metrics=$out/nix-support/hydra-metrics
|
|
|
|
mkdir -p "$(dirname "$metrics")"
|
|
|
|
echo "lineCoverage 18 %" >> "$metrics"
|
|
|
|
echo "maxResident 27 KiB" >> "$metrics"
|
|
|
|
''
|
|
|
|
)
|
|
|
|
];
|
|
|
|
}
|
|
|
|
) // {
|
|
|
|
meta = {
|
|
|
|
license = "GPL";
|
|
|
|
description = "An example meta property.";
|
|
|
|
homepage = "https://github.com/NixOS/hydra";
|
|
|
|
};
|
2021-02-23 21:10:34 +00:00
|
|
|
};
|
|
|
|
}
|