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