summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/neovim
diff options
context:
space:
mode:
authorKlemens Nanni <klemens@posteo.de>2020-11-05 02:12:50 +0100
committerAndreas Rammhold <andreas@rammhold.de>2020-11-05 11:41:53 +0100
commite0f258f596bd943ec1a0ca25ddfc9e9b886f32cb (patch)
tree7e629cac21c8f8467fd0a3745aa1f65c7ad9ca60 /pkgs/applications/editors/neovim
parentce08cf0a29b0e2bbfb4a669aaa1f294143643b84 (diff)
neovim: Do $PATH lookup in neovim.desktop instead of hardcoding derivation
See db236e588de "steam: Do $PATH lookup in steam.desktop [...]". tl;dr: Otherwise widget/panel/desktop icons in DEs like KDE break. Simply stop adding the full derivation path for neovim and stick with how upstream uses no path at all. While here, take care of gnvim.desktop as well by adjusting the sed(1) expression (and simplifying it in one go); I do not use gnvim.desktop but built it and confirmed the resulting files to contain no full paths any longer.
Diffstat (limited to 'pkgs/applications/editors/neovim')
-rw-r--r--pkgs/applications/editors/neovim/gnvim/wrapper.nix4
-rw-r--r--pkgs/applications/editors/neovim/wrapper.nix1
2 files changed, 1 insertions, 4 deletions
diff --git a/pkgs/applications/editors/neovim/gnvim/wrapper.nix b/pkgs/applications/editors/neovim/gnvim/wrapper.nix
index e16fe8a8adc7..bb9930b6c718 100644
--- a/pkgs/applications/editors/neovim/gnvim/wrapper.nix
+++ b/pkgs/applications/editors/neovim/gnvim/wrapper.nix
@@ -23,9 +23,7 @@ stdenv.mkDerivation {
cp -r '${gnvim-unwrapped}/share/applications' "$out/share/applications"
# Sed needs a writable directory to do inplace modifications
chmod u+rw "$out/share/applications"
- for file in $out/share/applications/*.desktop; do
- sed -e "s|Exec=.\\+gnvim\\>|Exec=$out/bin/gnvim|" -i "$file"
- done
+ sed -e "s|Exec=.\\+gnvim\\>|Exec=gnvim|" -i $out/share/applications/*.desktop
'';
preferLocalBuild = true;
diff --git a/pkgs/applications/editors/neovim/wrapper.nix b/pkgs/applications/editors/neovim/wrapper.nix
index 71bc38eadcfb..111e84e63437 100644
--- a/pkgs/applications/editors/neovim/wrapper.nix
+++ b/pkgs/applications/editors/neovim/wrapper.nix
@@ -43,7 +43,6 @@ let
postBuild = 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'
''
+ optionalString withPython2 ''