mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
buildRustCrate: fix #78412
`build.rs` files might create files. Those files are supposed to go into `OUT_DIR` (envirionment variable) and not be overlayed onto the source tree.
This commit is contained in:
parent
19698d15ce
commit
a57d0fe0bb
@ -137,16 +137,7 @@ in ''
|
||||
CRATENAME=$(echo ${crateName} | sed -e "s/\(.*\)-sys$/\U\1/")
|
||||
grep -P "^cargo:(?!(rustc-|warning=|rerun-if-changed=|rerun-if-env-changed))" target/build/${crateName}.opt \
|
||||
| sed -e "s/cargo:\([^=]*\)=\(.*\)/export DEP_$(echo $CRATENAME)_\U\1\E=\2/" > target/env
|
||||
|
||||
set -e
|
||||
if [[ -n "$(ls target/build/${crateName}.out)" ]]; then
|
||||
|
||||
if [[ -e "${libPath}" ]]; then
|
||||
cp -r target/build/${crateName}.out/* $(dirname ${libPath}) #*/
|
||||
else
|
||||
cp -r target/build/${crateName}.out/* src #*/
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
runHook postConfigure
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user