git.iko.soy/typeable/nixpkgs
on master help sign in
vim-plugins: add {pre,post}Install hooks to `buildVimPlugin`
commit5fb2184bd333d8ea72ebb452539955ee2b347835 authorMaximilian Bosch <maximilian@mbosch.me> dateMon 25 Sep 2017, 14:24 (9 years ago) parent756698f
1 file changed+7−1
pkgs/misc/vim-plugins/vim-utils.nix+7−1
pkgs/misc/vim-plugins/vim-utils.nix+7−1
@@ -383,6 +383,8 @@ rec {
383383 unpackPhase ? "",
384384 configurePhase ? "",
385385 buildPhase ? "",
386+ preInstall ? "",
387+ postInstall ? "",
386388 path ? (builtins.parseDrvName name).name,
387389 addonInfo ? null,
388390 ...
@@ -390,9 +392,11 @@ rec {
390392 addRtp "${rtpPath}/${path}" (stdenv.mkDerivation (a // {
391393 name = namePrefix + name;
392394
393− inherit unpackPhase configurePhase buildPhase addonInfo;
395+ inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
394396
395397 installPhase = ''
398+ runHook preInstall
399+
396400 target=$out/${rtpPath}/${path}
397401 mkdir -p $out/${rtpPath}
398402 cp -r . $target
@@ -401,6 +405,8 @@ rec {
401405 if [ -n "$addonInfo" ]; then
402406 echo "$addonInfo" > $target/addon-info.json
403407 fi
408+
409+ runHook postInstall
404410 '';
405411 }));
406412