run pre/post hooks

This commit is contained in:
Christian Ulrich 2019-06-17 12:03:04 +02:00
parent 6cca018a82
commit 7aaed73c5d
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 8 additions and 0 deletions

View File

@ -43,13 +43,19 @@ stdenv.mkDerivation {
LD_LIBRARY_PATH = makeLibraryPath (rBuildInputs ++ rNativeBuildInputs);
buildPhase = ''
runHook preBuild
HOME=$TMPDIR
NIMBLE_DIR=$HOME/.nimble
'' + copyNimDeps + ''
nimble install
runHook PostBuild
'';
installPhase = ''
runHook preInstall
mkdir $out
if [ -d $NIMBLE_DIR/bin ]; then
cp -RL $NIMBLE_DIR/bin $out
@ -60,6 +66,8 @@ stdenv.mkDerivation {
mkdir -p $out/.nimble
cp -R $NIMBLE_DIR/pkgs $out/.nimble
fi
runHook postInstall
'';
shellHook = ''