3
0
Fork 0
forked from mirrors/nixpkgs

spacevim: best practices

This commit is contained in:
Louis Bettens 2021-02-20 18:08:41 +01:00
parent b76056aebc
commit 92bc0f7bc6

View file

@ -28,13 +28,19 @@ in stdenv.mkDerivation rec {
buildInputs = [ vim-customized ];
buildPhase = ''
runHook preBuild
# generate the helptags
vim -u NONE -c "helptags $(pwd)/doc" -c q
runHook postBuild
'';
patches = [ ./helptags.patch ];
patches = [
# Don't generate helptags at runtime into read-only $SPACEVIMDIR
./helptags.patch
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r $(pwd) $out/SpaceVim
@ -43,6 +49,7 @@ in stdenv.mkDerivation rec {
makeWrapper "${vim-customized}/bin/vim" "$out/bin/spacevim" \
--add-flags "-u $out/SpaceVim/vimrc" --set SPACEVIMDIR "${spacevimdir}/" \
--prefix PATH : ${lib.makeBinPath [ fzf git ripgrep]}
runHook postInstall
'';
meta = with lib; {