From 5fb2184bd333d8ea72ebb452539955ee2b347835 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 25 Sep 2017 14:24:01 +0200 Subject: vim-plugins: add {pre,post}Install hooks to `buildVimPlugin` --- pkgs/misc/vim-plugins/vim-utils.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkgs/misc/vim-plugins') 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 ''; })); -- cgit 1.4.1