gnvim: fix install phase with Rust with custom target

This commit is contained in:
Minijackson 2021-03-06 17:11:31 +01:00 committed by Matthieu Coudron
parent f2ed6d87a4
commit de6283bebf

View file

@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
# The default build script tries to get the version through Git, so we
# replace it
prePatch = ''
postPatch = ''
cat << EOF > build.rs
use std::env;
use std::fs::File;
@ -31,13 +31,13 @@ rustPlatform.buildRustPackage rec {
f.write_all(b"const VERSION: &str = \"${version}\";").unwrap();
}
EOF
# Install the binary ourselves, since the Makefile doesn't have the path
# containing the target architecture
sed -e "/target\/release/d" -i Makefile
'';
buildPhase = ''
make build
'';
installPhase = ''
postInstall = ''
make install PREFIX="${placeholder "out"}"
'';