Skip to content

Commit

Permalink
gnvim: fix install phase with Rust with custom target
Browse files Browse the repository at this point in the history
  • Loading branch information
minijackson committed Mar 6, 2021
1 parent 1d0cd06 commit ec5fb3c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkgs/applications/editors/neovim/gnvim/default.nix
Expand Up @@ -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;
Expand All @@ -31,13 +31,13 @@ rustPlatform.buildRustPackage rec {
f.write_all(b"const VERSION: &str = \"${version}\";").unwrap();
}
EOF
'';
buildPhase = ''
make build
# Install the binary ourselves, since the Makefile doesn't have the path
# containing the target architecture
sed -e "/target\/release/d" -i Makefile
'';

installPhase = ''
postInstall = ''
make install PREFIX="${placeholder "out"}"
'';

Expand Down

0 comments on commit ec5fb3c

Please sign in to comment.