diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2017-01-11 18:39:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 18:39:05 +0100 |
commit | 104c3db6594043dbb81005303f055b02145305a5 (patch) | |
tree | dd2e08888160affb7f6ea4e4a5ee620ff3330d69 /pkgs | |
parent | 66bdcb4dfd755028fadbb16d5a31e02b8ba8ea04 (diff) | |
parent | d1226333e22a5cccd5247a323b7e70e809ee5efb (diff) | |
download | nixpkgs-104c3db6594043dbb81005303f055b02145305a5.tar nixpkgs-104c3db6594043dbb81005303f055b02145305a5.tar.gz nixpkgs-104c3db6594043dbb81005303f055b02145305a5.tar.bz2 nixpkgs-104c3db6594043dbb81005303f055b02145305a5.tar.lz nixpkgs-104c3db6594043dbb81005303f055b02145305a5.tar.xz nixpkgs-104c3db6594043dbb81005303f055b02145305a5.tar.zst nixpkgs-104c3db6594043dbb81005303f055b02145305a5.zip |
Merge pull request #21202 from kierdavis/unigine-valley
unigine-valley: refactor
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/graphics/unigine-valley/default.nix | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/pkgs/applications/graphics/unigine-valley/default.nix b/pkgs/applications/graphics/unigine-valley/default.nix index 8fef29fa107..1bb57538cd5 100644 --- a/pkgs/applications/graphics/unigine-valley/default.nix +++ b/pkgs/applications/graphics/unigine-valley/default.nix @@ -16,7 +16,6 @@ let version = "1.0"; - pkgversion = "1"; arch = if stdenv.system == "x86_64-linux" then "x64" @@ -26,8 +25,8 @@ let abort "Unsupported platform"; in - stdenv.mkDerivation { - name = "unigine-valley-${version}-${pkgversion}"; + stdenv.mkDerivation rec { + name = "unigine-valley-${version}"; src = fetchurl { url = "http://assets.unigine.com/d/Unigine_Valley-${version}.run"; @@ -35,6 +34,7 @@ in }; sourceRoot = "Unigine_Valley-${version}"; + instPath = "lib/unigine/valley"; buildInputs = [file makeWrapper]; @@ -56,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/opt/unigine/valley + instdir=$out/${instPath} # Install executables and libraries mkdir -p $instdir/bin @@ -94,10 +88,12 @@ in --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath ''; + 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/opt/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"]; }; |