Merge pull request #113762 from lourkeur/fix_110407

spacevim: fix #110407

authored by

Anderson Torres and committed by
GitHub
85e08ba0 19d715c5

+13 -3
+13 -3
pkgs/applications/editors/spacevim/default.nix
··· 1 1 { ripgrep, git, fzf, makeWrapper, vim_configurable, vimPlugins, fetchFromGitHub 2 - , lib, stdenv, formats, spacevim_config ? import ./init.nix }: 2 + , lib, stdenv, formats, runCommand, spacevim_config ? import ./init.nix }: 3 3 4 4 let 5 5 format = formats.toml {}; ··· 10 10 # ~/.cache/vimfiles/repos 11 11 vimrcConfig.packages.myVimPackage = with vimPlugins; { start = [ ]; }; 12 12 }; 13 - spacevimdir = format.generate "init.toml" spacevim_config; 13 + spacevimdir = runCommand "SpaceVim.d" { } '' 14 + mkdir -p $out 15 + cp ${format.generate "init.toml" spacevim_config} $out/init.toml 16 + ''; 14 17 in stdenv.mkDerivation rec { 15 18 pname = "spacevim"; 16 19 version = "1.5.0"; ··· 25 28 buildInputs = [ vim-customized ]; 26 29 27 30 buildPhase = '' 31 + runHook preBuild 28 32 # generate the helptags 29 33 vim -u NONE -c "helptags $(pwd)/doc" -c q 34 + runHook postBuild 30 35 ''; 31 36 32 - patches = [ ./helptags.patch ]; 37 + patches = [ 38 + # Don't generate helptags at runtime into read-only $SPACEVIMDIR 39 + ./helptags.patch 40 + ]; 33 41 34 42 installPhase = '' 43 + runHook preInstall 35 44 mkdir -p $out/bin 36 45 37 46 cp -r $(pwd) $out/SpaceVim ··· 40 49 makeWrapper "${vim-customized}/bin/vim" "$out/bin/spacevim" \ 41 50 --add-flags "-u $out/SpaceVim/vimrc" --set SPACEVIMDIR "${spacevimdir}/" \ 42 51 --prefix PATH : ${lib.makeBinPath [ fzf git ripgrep]} 52 + runHook postInstall 43 53 ''; 44 54 45 55 meta = with lib; {