1
0
forked from M-Labs/nac3

flake: fix Windows build

This commit is contained in:
Sebastien Bourdeauducq 2022-02-05 16:53:47 +08:00
parent 1288624218
commit f5ce7376e3

View File

@ -161,12 +161,12 @@
configurePhase = configurePhase =
'' ''
# Link libstdc++ statically. As usual with cargo, this is an adventure. # Link libstdc++ statically. As usual with cargo, this is an adventure.
cp --no-preserve=mode,ownership -R $CARGO_HOME/cargo-vendor-dir/llvm-sys-130.0.1/ llvm-sys-130.0.1 cp --no-preserve=mode,ownership -R $CARGO_HOME/cargo-vendor-dir/llvm-sys-130.0.2/ llvm-sys-130.0.2
substituteInPlace llvm-sys-130.0.1/build.rs --replace "cargo:rustc-link-lib=dylib=" "cargo:rustc-link-lib=static=" substituteInPlace llvm-sys-130.0.2/build.rs --replace "cargo:rustc-link-lib=dylib=" "cargo:rustc-link-lib=static="
substituteInPlace llvm-sys-130.0.1/build.rs --replace "fn main() {" "fn main() { println!(\"cargo:rustc-link-search=native=${pkgs-mingw.stdenv.cc.cc}/x86_64-w64-mingw32/lib\");" substituteInPlace llvm-sys-130.0.2/build.rs --replace "fn main() {" "fn main() { println!(\"cargo:rustc-link-search=native=${pkgs-mingw.stdenv.cc.cc}/x86_64-w64-mingw32/lib\");"
chmod 755 $CARGO_HOME/cargo-vendor-dir chmod 755 $CARGO_HOME/cargo-vendor-dir
rm $CARGO_HOME/cargo-vendor-dir/llvm-sys-130.0.1 rm $CARGO_HOME/cargo-vendor-dir/llvm-sys-130.0.2
mv llvm-sys-130.0.1 $CARGO_HOME/cargo-vendor-dir/llvm-sys-130.0.1 mv llvm-sys-130.0.2 $CARGO_HOME/cargo-vendor-dir/llvm-sys-130.0.2
export PYO3_CONFIG_FILE=${pyo3-mingw-config} export PYO3_CONFIG_FILE=${pyo3-mingw-config}