forked from M-Labs/artiq
1
0
Fork 0

flake: register firmware outputs as hydra build products

This commit is contained in:
Sebastien Bourdeauducq 2023-08-25 13:25:22 +08:00
parent f5cbca9c29
commit 72b0a17542
1 changed files with 10 additions and 6 deletions

View File

@ -275,16 +275,20 @@
''; '';
installPhase = installPhase =
'' ''
TARGET_DIR=$out mkdir $out
mkdir -p $TARGET_DIR cp artiq_${target}/${variant}/gateware/top.bit $out
cp artiq_${target}/${variant}/gateware/top.bit $TARGET_DIR
if [ -e artiq_${target}/${variant}/software/bootloader/bootloader.bin ] if [ -e artiq_${target}/${variant}/software/bootloader/bootloader.bin ]
then cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $TARGET_DIR then cp artiq_${target}/${variant}/software/bootloader/bootloader.bin $out
fi fi
if [ -e artiq_${target}/${variant}/software/runtime ] if [ -e artiq_${target}/${variant}/software/runtime ]
then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $TARGET_DIR then cp artiq_${target}/${variant}/software/runtime/runtime.{elf,fbi} $out
else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $TARGET_DIR else cp artiq_${target}/${variant}/software/satman/satman.{elf,fbi} $out
fi fi
mkdir $out/nix-support
for i in $out/*.*; do
echo file binary-dist $i >> $out/nix-support/hydra-build-products
done
''; '';
# don't mangle ELF files as they are not for NixOS # don't mangle ELF files as they are not for NixOS
dontFixup = true; dontFixup = true;