Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 66bdcb4dfd75
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 104c3db65940
Choose a head ref
  • 5 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 16, 2016

  1. unigine-valley: 1.0-1 -> 1.0 (remove unnecessary release version)

    The upstream version is "1.0", so that's what the version of the Nix package should be too.
    When I packaged this I wasn't aware that a Nix package could update without its version number
    increasing, so I added an extra "release version" (like Arch Linux packages). Of course, this
    isn't necessary.
    kierdavis committed Dec 16, 2016
    Copy the full SHA
    0d1d1bd View commit details
  2. unigine-valley: install files to a more idiomatic location

    Previously, the entire installation was copied to $out/opt/unigine/valley.
    Using $out/lib instead of $out/opt would be more consistent with other Nix packages.
    kierdavis committed Dec 16, 2016
    Copy the full SHA
    c3f49dc View commit details
  3. Copy the full SHA
    aa53e1d View commit details
  4. unigine-valley: clean up

    kierdavis committed Dec 16, 2016
    Copy the full SHA
    d122633 View commit details

Commits on Jan 11, 2017

  1. Merge pull request #21202 from kierdavis/unigine-valley

    unigine-valley: refactor
    joachifm authored Jan 11, 2017
    Copy the full SHA
    104c3db View commit details
Showing with 7 additions and 11 deletions.
  1. +7 −11 pkgs/applications/graphics/unigine-valley/default.nix
18 changes: 7 additions & 11 deletions pkgs/applications/graphics/unigine-valley/default.nix
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@

let
version = "1.0";
pkgversion = "1";

arch = if stdenv.system == "x86_64-linux" then
"x64"
@@ -26,15 +25,16 @@ 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";
sha256 = "5f0c8bd2431118551182babbf5f1c20fb14e7a40789697240dcaf546443660f4";
};

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"];
};