neovim: Do $PATH lookup in neovim.desktop instead of hardcoding derivation
See db236e588d
"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.
This commit is contained in:
parent
ce08cf0a29
commit
e0f258f596
|
@ -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;
|
||||
|
|
|
@ -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 ''
|
||||
|
|
Loading…
Reference in a new issue