vim_configurable: don't rewrap
See discussion at 40dea2488f (commitcomment-68982753)
Also remove the patchelf call on gvim since it's a symlink now.
This commit is contained in:
parent
7ab1fd262f
commit
65a6e2cb0d
@ -3,7 +3,7 @@
|
||||
, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
|
||||
, libICE
|
||||
, vimPlugins
|
||||
, makeWrapper
|
||||
, makeWrapper, makeBinaryWrapper
|
||||
, wrapGAppsHook
|
||||
, runtimeShell
|
||||
|
||||
@ -134,7 +134,9 @@ in stdenv.mkDerivation rec {
|
||||
++ lib.optional wrapPythonDrv makeWrapper
|
||||
++ lib.optional nlsSupport gettext
|
||||
++ lib.optional perlSupport perl
|
||||
++ lib.optional (guiSupport == "gtk3") wrapGAppsHook
|
||||
# Make the inner wrapper binary to avoid double wrapping issues with wrapPythonDrv
|
||||
# (https://github.com/NixOS/nixpkgs/pull/164163)
|
||||
++ lib.optional (guiSupport == "gtk3") (wrapGAppsHook.override { makeWrapper = makeBinaryWrapper; })
|
||||
;
|
||||
|
||||
buildInputs = [
|
||||
@ -177,37 +179,13 @@ in stdenv.mkDerivation rec {
|
||||
patchelf --set-rpath \
|
||||
"$(patchelf --print-rpath $out/bin/vim):${lib.makeLibraryPath buildInputs}" \
|
||||
"$out"/bin/vim
|
||||
if [[ -e "$out"/bin/gvim ]]; then
|
||||
patchelf --set-rpath \
|
||||
"$(patchelf --print-rpath $out/bin/vim):${lib.makeLibraryPath buildInputs}" \
|
||||
"$out"/bin/gvim
|
||||
fi
|
||||
|
||||
ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc
|
||||
'' + lib.optionalString wrapPythonDrv ''
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString wrapPythonDrv ''
|
||||
wrapProgram "$out/bin/vim" --prefix PATH : "${python3}/bin" \
|
||||
--set NIX_PYTHONPATH "${python3}/${python3.sitePackages}"
|
||||
'' + lib.optionalString (guiSupport == "gtk3") ''
|
||||
|
||||
rewrap () {
|
||||
rm -f "$out/bin/$1"
|
||||
echo -e '#!${runtimeShell}\n"'"$out/bin/vim"'" '"$2"' "$@"' > "$out/bin/$1"
|
||||
chmod a+x "$out/bin/$1"
|
||||
}
|
||||
|
||||
rewrap ex -e
|
||||
rewrap view -R
|
||||
rewrap gvim -g
|
||||
rewrap gex -eg
|
||||
rewrap gview -Rg
|
||||
rewrap rvim -Z
|
||||
rewrap rview -RZ
|
||||
rewrap rgvim -gZ
|
||||
rewrap rgview -RgZ
|
||||
rewrap evim -y
|
||||
rewrap eview -yR
|
||||
rewrap vimdiff -d
|
||||
rewrap gvimdiff -gd
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
Loading…
Reference in New Issue
Block a user