diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2017-09-25 14:24:01 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2017-09-25 22:18:47 +0200 |
commit | 5fb2184bd333d8ea72ebb452539955ee2b347835 (patch) | |
tree | ccdb0bf477a7b2836af53c18824ad1a10ff27e3f /pkgs/misc/vim-plugins | |
parent | 756698f0a737e0654900a2fdc74c5d2e1769f964 (diff) | |
download | nixlib-5fb2184bd333d8ea72ebb452539955ee2b347835.tar nixlib-5fb2184bd333d8ea72ebb452539955ee2b347835.tar.gz nixlib-5fb2184bd333d8ea72ebb452539955ee2b347835.tar.bz2 nixlib-5fb2184bd333d8ea72ebb452539955ee2b347835.tar.lz nixlib-5fb2184bd333d8ea72ebb452539955ee2b347835.tar.xz nixlib-5fb2184bd333d8ea72ebb452539955ee2b347835.tar.zst nixlib-5fb2184bd333d8ea72ebb452539955ee2b347835.zip |
vim-plugins: add {pre,post}Install hooks to `buildVimPlugin`
Diffstat (limited to 'pkgs/misc/vim-plugins')
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 87b2f9d3e188..b659266ace7f 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -383,6 +383,8 @@ rec { unpackPhase ? "", configurePhase ? "", buildPhase ? "", + preInstall ? "", + postInstall ? "", path ? (builtins.parseDrvName name).name, addonInfo ? null, ... @@ -390,9 +392,11 @@ rec { addRtp "${rtpPath}/${path}" (stdenv.mkDerivation (a // { name = namePrefix + name; - inherit unpackPhase configurePhase buildPhase addonInfo; + inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; installPhase = '' + runHook preInstall + target=$out/${rtpPath}/${path} mkdir -p $out/${rtpPath} cp -r . $target @@ -401,6 +405,8 @@ rec { if [ -n "$addonInfo" ]; then echo "$addonInfo" > $target/addon-info.json fi + + runHook postInstall ''; })); |