windows: finalize nac3artiq packaging

This commit is contained in:
Sebastien Bourdeauducq 2022-03-22 19:58:31 +08:00
parent 1c807ebe08
commit f2dc03dfa1
1 changed files with 9 additions and 1 deletions

View File

@ -79,7 +79,7 @@ in rec {
src = ../.;
cargoLock = { lockFile = ../Cargo.lock; };
doCheck = false;
nativeBuildInputs = [ pkgs.wineWowPackages.stable ];
nativeBuildInputs = [ pkgs.wineWowPackages.stable pkgs.zip ];
buildPhase =
''
export HOME=`mktemp -d`
@ -89,5 +89,13 @@ in rec {
export PYO3_CONFIG_FILE=Z:${pyo3-mingw-config}
wine64 cargo build --release -p nac3artiq
'';
installPhase =
''
mkdir -p $out $out/nix-support
ln -s target/release/nac3artiq.dll nac3artiq.pyd
zip $out/nac3artiq.zip nac3artiq.pyd
echo file binary-dist $out/nac3artiq.zip >> $out/nix-support/hydra-build-products
'';
dontFixup = true;
};
}