about summary refs log tree commit diff
path: root/pkgs/applications/editors/spacevim
diff options
context:
space:
mode:
authorLouis Bettens <louis@bettens.info>2021-02-20 18:08:41 +0100
committerLouis Bettens <louis@bettens.info>2021-02-20 18:08:41 +0100
commit92bc0f7bc61baf88e40a6c846f9ce352407f49a2 (patch)
tree4a9e9ebf7ef01c7358dafe3130e2cddbc903374d /pkgs/applications/editors/spacevim
parentb76056aebcdddf7e68170a57314c4c6afd599d49 (diff)
spacevim: best practices
Diffstat (limited to 'pkgs/applications/editors/spacevim')
-rw-r--r--pkgs/applications/editors/spacevim/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/applications/editors/spacevim/default.nix b/pkgs/applications/editors/spacevim/default.nix
index 88d1857324029..930c8f919e462 100644
--- a/pkgs/applications/editors/spacevim/default.nix
+++ b/pkgs/applications/editors/spacevim/default.nix
@@ -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; {