about summary refs log tree commit diff
path: root/pkgs/applications/editors/neovim/wrapper.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/neovim/wrapper.nix')
-rw-r--r--pkgs/applications/editors/neovim/wrapper.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix
index 716ec8d06aeed..0ac90a8b3454d 100644
--- a/pkgs/applications/editors/neovim/wrapper.nix
+++ b/pkgs/applications/editors/neovim/wrapper.nix
@@ -116,11 +116,14 @@ let
   in
   symlinkJoin {
       name = "neovim-${stdenv.lib.getVersion neovim}";
+      # Remove the symlinks created by symlinkJoin which we need to perform
+      # extra actions upon
       postBuild = ''
-        # Remove the symlinks created by symlinkJoin which we need to perform
-        # extra actions upon
-        rm $out/share/applications/nvim.desktop $out/bin/nvim
+        rm $out/bin/nvim
         makeWrapper ${lib.escapeShellArgs initialMakeWrapperArgs} ${extraMakeWrapperArgs}
+      ''
+      + lib.optionalString stdenv.isLinux ''
+        rm $out/share/applications/nvim.desktop
         substitute ${neovim}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \
           --replace 'TryExec=nvim' "TryExec=$out/bin/nvim" \
           --replace 'Name=Neovim' 'Name=WrappedNeovim'