unigine-valley: clean up
This commit is contained in:
parent
aa53e1d17e
commit
d1226333e2
@ -25,7 +25,7 @@ let
|
||||
abort "Unsupported platform";
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "unigine-valley-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
@ -34,6 +34,7 @@ in
|
||||
};
|
||||
|
||||
sourceRoot = "Unigine_Valley-${version}";
|
||||
instPath = "lib/unigine/valley";
|
||||
|
||||
buildInputs = [file makeWrapper];
|
||||
|
||||
@ -55,22 +56,16 @@ in
|
||||
./extractor.run --target $sourceRoot
|
||||
'';
|
||||
|
||||
# The executable loads libGPUMonitor_${arch}.so "manually" (i.e. not through the ELF interpreter).
|
||||
# However, it still uses the RPATH to look for it.
|
||||
patchPhase = ''
|
||||
# Patch ELF files.
|
||||
elfs=$(find bin -type f | xargs file | grep ELF | cut -d ':' -f 1)
|
||||
for elf in $elfs; do
|
||||
echo "Patching $elf"
|
||||
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $elf || true
|
||||
done
|
||||
'';
|
||||
|
||||
configurePhase = "";
|
||||
buildPhase = "";
|
||||
|
||||
installPhase = ''
|
||||
instdir=$out/lib/unigine/valley
|
||||
instdir=$out/${instPath}
|
||||
|
||||
# Install executables and libraries
|
||||
mkdir -p $instdir/bin
|
||||
@ -93,12 +88,12 @@ in
|
||||
--prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath
|
||||
'';
|
||||
|
||||
stripDebugList = ["lib/unigine/valley/bin"];
|
||||
stripDebugList = ["${instPath}/bin"];
|
||||
|
||||
meta = {
|
||||
description = "The Unigine Valley GPU benchmarking tool";
|
||||
homepage = "http://unigine.com/products/benchmarks/valley/";
|
||||
license = stdenv.lib.licenses.unfree; # see also: /nix/store/*-unigine-valley-1.0/lib/unigine/valley/documentation/License.pdf
|
||||
license = stdenv.lib.licenses.unfree; # see also: $out/$instPath/documentation/License.pdf
|
||||
maintainers = [ stdenv.lib.maintainers.kierdavis ];
|
||||
platforms = ["x86_64-linux" "i686-linux"];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user