summary refs log tree commit diff
path: root/pkgs/applications/graphics/unigine-valley
diff options
context:
space:
mode:
authorKier Davis <kierdavis@gmail.com>2017-06-05 19:08:07 +0100
committerKier Davis <kierdavis@gmail.com>2017-06-05 19:13:19 +0100
commitb81124b4fb9084aa1f6cc6f7b134a27200c7c0ed (patch)
treed6846513e99966e39db48673f31353166ed7271a /pkgs/applications/graphics/unigine-valley
parent602a492bb740f10f5abf99f5e42f189bddcef8b7 (diff)
downloadnixpkgs-b81124b4fb9084aa1f6cc6f7b134a27200c7c0ed.tar
nixpkgs-b81124b4fb9084aa1f6cc6f7b134a27200c7c0ed.tar.gz
nixpkgs-b81124b4fb9084aa1f6cc6f7b134a27200c7c0ed.tar.bz2
nixpkgs-b81124b4fb9084aa1f6cc6f7b134a27200c7c0ed.tar.lz
nixpkgs-b81124b4fb9084aa1f6cc6f7b134a27200c7c0ed.tar.xz
nixpkgs-b81124b4fb9084aa1f6cc6f7b134a27200c7c0ed.tar.zst
nixpkgs-b81124b4fb9084aa1f6cc6f7b134a27200c7c0ed.zip
Fix hooks not being called when overriding phases in various packages
It's necessary to do this in order to fix ckb's compilation, now that
fixupPhase rejects derivation results containing references to the temporary
build directory. It seems like good practice so I've added it to the
other packages that I maintain.
Diffstat (limited to 'pkgs/applications/graphics/unigine-valley')
-rw-r--r--pkgs/applications/graphics/unigine-valley/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/unigine-valley/default.nix b/pkgs/applications/graphics/unigine-valley/default.nix
index 1bb57538cd5..dc896e0b0d9 100644
--- a/pkgs/applications/graphics/unigine-valley/default.nix
+++ b/pkgs/applications/graphics/unigine-valley/default.nix
@@ -51,20 +51,30 @@ in
     ];
 
     unpackPhase = ''
+      runHook preUnpack
+
       cp $src extractor.run
       chmod +x extractor.run
       ./extractor.run --target $sourceRoot
+
+      runHook postUnpack
     '';
 
     patchPhase = ''
+      runHook prePatch
+
       # Patch ELF files.
       elfs=$(find bin -type f | xargs file | grep ELF | cut -d ':' -f 1)
       for elf in $elfs; do
         patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $elf || true
       done
+
+      runHook postPatch
     '';
 
     installPhase = ''
+      runHook preInstall
+
       instdir=$out/${instPath}
 
       # Install executables and libraries
@@ -86,6 +96,8 @@ in
       wrapProgram $out/bin/valley \
         --run "cd $instdir" \
         --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath
+
+      runHook postInstall
     '';
 
     stripDebugList = ["${instPath}/bin"];