lib.build: generate hydra-build-products

This commit is contained in:
Emery Hemingway 2022-05-28 18:32:25 -05:00
parent 4061b83f32
commit 5bb153d7b0
1 changed files with 12 additions and 1 deletions

View File

@ -92,7 +92,18 @@ stdenv.mkDerivation {
'';
installPhase = ''
cp -ar bin/targets/${target}/${variant} $out
mkdir -p $out/nix-support
pushd bin/targets/${target}/${variant}
for src in *; do
dst="$out/$src"
cp -ar "$src" "$dst"
if [ -f "$dst" ]; then
filename=$(basename "$dst")
echo "file ''${filename##*.} $dst" >> $out/nix-support/hydra-build-products
fi
done
popd
'';
dontFixup = true;
}