From de6283bebfa63c43ef16eee5d66c666a24cfd0ad Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 6 Mar 2021 17:11:31 +0100 Subject: [PATCH] gnvim: fix install phase with Rust with custom target --- pkgs/applications/editors/neovim/gnvim/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/neovim/gnvim/default.nix b/pkgs/applications/editors/neovim/gnvim/default.nix index 208339c2e38..8e86683f9bf 100644 --- a/pkgs/applications/editors/neovim/gnvim/default.nix +++ b/pkgs/applications/editors/neovim/gnvim/default.nix @@ -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"}" '';