summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2021-03-06 17:11:31 +0100
committerMatthieu Coudron <teto@users.noreply.github.com>2021-03-06 22:02:30 +0100
commitde6283bebfa63c43ef16eee5d66c666a24cfd0ad (patch)
treefe82e0c4ed763497d243157a32b2ee3180bab035 /pkgs/applications/editors
parentf2ed6d87a40ad55c5b71dd95bbf3287900e42ae9 (diff)
downloadnixpkgs-de6283bebfa63c43ef16eee5d66c666a24cfd0ad.tar
nixpkgs-de6283bebfa63c43ef16eee5d66c666a24cfd0ad.tar.gz
nixpkgs-de6283bebfa63c43ef16eee5d66c666a24cfd0ad.tar.bz2
nixpkgs-de6283bebfa63c43ef16eee5d66c666a24cfd0ad.tar.lz
nixpkgs-de6283bebfa63c43ef16eee5d66c666a24cfd0ad.tar.xz
nixpkgs-de6283bebfa63c43ef16eee5d66c666a24cfd0ad.tar.zst
nixpkgs-de6283bebfa63c43ef16eee5d66c666a24cfd0ad.zip
gnvim: fix install phase with Rust with custom target
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/neovim/gnvim/default.nix10
1 files changed, 5 insertions, 5 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
-  '';
 
-  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"}"
   '';