vim-plugins: add {pre,post}Install hooks to buildVimPlugin

This commit is contained in:
Maximilian Bosch 2017-09-25 14:24:01 +02:00
parent 756698f0a7
commit 5fb2184bd3
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -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
'';
}));