Rust build-support: fixing a compilation error in some crates (such as proc-macro2)

This commit is contained in:
Pierre-Étienne Meunier 2018-11-16 12:12:59 +00:00
parent 5632aad473
commit f1de24feb8
2 changed files with 7 additions and 3 deletions

View File

@ -71,6 +71,8 @@ in ''
export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0}
export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1}
export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2}
export NUM_JOBS=1
export RUSTC="rustc"
if [[ -n "${versionPre}" ]]; then
export CARGO_PKG_VERSION_PRE="${versionPre}"
fi

View File

@ -20,9 +20,11 @@ crateName: metadata:
mkdir -p $out/lib
cp -r target/build/* $out/lib # */
fi
if [[ "$(ls -A target/bin)" ]]; then
mkdir -p $out/bin
cp -P target/bin/* $out/bin # */
if [[ -d target/bin ]]; then
if [[ "$(ls -A target/bin)" ]]; then
mkdir -p $out/bin
cp -P target/bin/* $out/bin # */
fi
fi
runHook postInstall
''