summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/ImageMagick/7.0.nix4
-rw-r--r--pkgs/applications/graphics/hydrus/default.nix4
-rw-r--r--pkgs/applications/graphics/unigine-valley/default.nix219
3 files changed, 124 insertions, 103 deletions
diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix
index 13a40cee5ed..48008c36933 100644
--- a/pkgs/applications/graphics/ImageMagick/7.0.nix
+++ b/pkgs/applications/graphics/ImageMagick/7.0.nix
@@ -45,13 +45,13 @@ in
 
 stdenv.mkDerivation rec {
   pname = "imagemagick";
-  version = "7.1.0-29";
+  version = "7.1.0-30";
 
   src = fetchFromGitHub {
     owner = "ImageMagick";
     repo = "ImageMagick";
     rev = version;
-    hash = "sha256-46fJMOIGnK5aNIcG7+8mJdZDcSFyFmhmkLcuVlnupSU=";
+    hash = "sha256-FfZJfjuQmYvYuOi18cZdr3Nam98/j+ZTGRwsd1sslsY=";
   };
 
   outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big
diff --git a/pkgs/applications/graphics/hydrus/default.nix b/pkgs/applications/graphics/hydrus/default.nix
index ef9bc61d57c..5a25ad3998f 100644
--- a/pkgs/applications/graphics/hydrus/default.nix
+++ b/pkgs/applications/graphics/hydrus/default.nix
@@ -10,14 +10,14 @@
 
 python3Packages.buildPythonPackage rec {
   pname = "hydrus";
-  version = "481";
+  version = "482";
   format = "other";
 
   src = fetchFromGitHub {
     owner = "hydrusnetwork";
     repo = "hydrus";
     rev = "refs/tags/v${version}";
-    sha256 = "sha256-6I4vLJj5WzC2bCtQYnoLGOL6N6pKFU+PZQqaOqhZhWU=";
+    sha256 = "sha256-b7zMHwsyZv4dCn4Gd/2a+MHhT3IHISJup/zm95pEcQ4=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/graphics/unigine-valley/default.nix b/pkgs/applications/graphics/unigine-valley/default.nix
index 81ed98f9ad4..9b51373178e 100644
--- a/pkgs/applications/graphics/unigine-valley/default.nix
+++ b/pkgs/applications/graphics/unigine-valley/default.nix
@@ -1,10 +1,15 @@
-{ lib, stdenv, fetchurl
+{ lib
+, stdenv
+, fetchurl
 
-# Build-time dependencies
+  # Build-time dependencies
 , makeWrapper
 , file
+, makeDesktopItem
+, imagemagick
+, copyDesktopItems
 
-# Runtime dependencies
+  # Runtime dependencies
 , fontconfig
 , freetype
 , libX11
@@ -12,104 +17,120 @@
 , libXinerama
 , libXrandr
 , libXrender
-, libGL
-, openal}:
+, libglvnd
+, openal
+}:
 
 let
   version = "1.0";
 
-  arch = if stdenv.hostPlatform.system == "x86_64-linux" then
-    "x64"
-  else if stdenv.hostPlatform.system == "i686-linux" then
-    "x86"
-  else
-    throw "Unsupported platform ${stdenv.hostPlatform.system}";
-
+  arch =
+    if stdenv.hostPlatform.system == "x86_64-linux" then
+      "x64"
+    else if stdenv.hostPlatform.system == "i686-linux" then
+      "x86"
+    else
+      throw "Unsupported platform ${stdenv.hostPlatform.system}";
 in
-  stdenv.mkDerivation rec {
-    pname = "unigine-valley";
-    inherit version;
-
-    src = fetchurl {
-      url = "http://assets.unigine.com/d/Unigine_Valley-${version}.run";
-      sha256 = "5f0c8bd2431118551182babbf5f1c20fb14e7a40789697240dcaf546443660f4";
-    };
-
-    sourceRoot = "Unigine_Valley-${version}";
-    instPath = "lib/unigine/valley";
-
-    nativeBuildInputs = [file makeWrapper];
-
-    libPath = lib.makeLibraryPath [
-      stdenv.cc.cc  # libstdc++.so.6
-      fontconfig
-      freetype
-      libX11
-      libXext
-      libXinerama
-      libXrandr
-      libXrender
-      libGL
-      openal
-    ];
-
-    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
-      mkdir -p $instdir/bin
-      install -m 0755 bin/browser_${arch} $instdir/bin
-      install -m 0755 bin/libApp{Stereo,Surround,Wall}_${arch}.so $instdir/bin
-      install -m 0755 bin/libGPUMonitor_${arch}.so $instdir/bin
-      install -m 0755 bin/libQt{Core,Gui,Network,WebKit,Xml}Unigine_${arch}.so.4 $instdir/bin
-      install -m 0755 bin/libUnigine_${arch}.so $instdir/bin
-      install -m 0755 bin/valley_${arch} $instdir/bin
-      install -m 0755 valley $instdir
-
-      # Install other files
-      cp -R data documentation $instdir
-
-      # Install and wrap executable
-      mkdir -p $out/bin
-      install -m 0755 valley $out/bin/valley
-      wrapProgram $out/bin/valley \
-        --chdir "$instdir" \
-        --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath
-
-      runHook postInstall
-    '';
-
-    stripDebugList = ["${instPath}/bin"];
-
-    meta = {
-      description = "The Unigine Valley GPU benchmarking tool";
-      homepage = "https://unigine.com/products/benchmarks/valley/";
-      license = lib.licenses.unfree; # see also: $out/$instPath/documentation/License.pdf
-      maintainers = [ lib.maintainers.kierdavis ];
-      platforms = ["x86_64-linux" "i686-linux"];
-    };
-  }
+
+stdenv.mkDerivation rec {
+  pname = "unigine-valley";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://m11-assets.unigine.com/d/Unigine_Valley-${version}.run";
+    sha256 = "5f0c8bd2431118551182babbf5f1c20fb14e7a40789697240dcaf546443660f4";
+  };
+
+  sourceRoot = "Unigine_Valley-${version}";
+  instPath = "lib/unigine/valley";
+
+  nativeBuildInputs = [ file makeWrapper imagemagick copyDesktopItems ];
+
+  libPath = lib.makeLibraryPath [
+    stdenv.cc.cc # libstdc++.so.6
+    fontconfig
+    freetype
+    libX11
+    libXext
+    libXinerama
+    libXrandr
+    libXrender
+    libglvnd
+    openal
+  ];
+
+  unpackPhase = ''
+    runHook preUnpack
+
+    cp $src extractor.run
+    chmod +x extractor.run
+    ./extractor.run --target $sourceRoot
+
+    runHook postUnpack
+  '';
+
+  postPatch = ''
+    # 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
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    instdir=$out/${instPath}
+    mkdir -p $out/share/icons/hicolor $out/share/applications $out/bin $instdir/bin
+
+    # Install executables and libraries
+    install -m 0755 bin/browser_${arch} $instdir/bin
+    install -m 0755 bin/libApp{Stereo,Surround,Wall}_${arch}.so $instdir/bin
+    install -m 0755 bin/libGPUMonitor_${arch}.so $instdir/bin
+    install -m 0755 bin/libQt{Core,Gui,Network,WebKit,Xml}Unigine_${arch}.so.4 $instdir/bin
+    install -m 0755 bin/libUnigine_${arch}.so $instdir/bin
+    install -m 0755 bin/valley_${arch} $instdir/bin
+    install -m 0755 valley $instdir
+    install -m 0755 valley $out/bin/valley
+
+    # Install other files
+    cp -R data documentation $instdir
+
+    # Install and wrap executable
+    wrapProgram $out/bin/valley \
+      --chdir "$instdir" \
+      --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:$instdir/bin:$libPath
+
+    # Make desktop Icon
+    convert $out/lib/unigine/valley/data/launcher/icon.png -resize 128x128 $out/share/icons/Valley.png
+    for RES in 16 24 32 48 64 128 256
+    do
+        mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps
+        convert $out/lib/unigine/valley/data/launcher/icon.png -resize "$RES"x"$RES" $out/share/icons/hicolor/"$RES"x"$RES"/apps/Valley.png
+    done
+
+    runHook postInstall
+  '';
+
+  desktopItems = [
+    (makeDesktopItem {
+      name = "Valley";
+      exec = "valley";
+      genericName = "A GPU Stress test tool from the UNIGINE";
+      icon = "Valley";
+      desktopName = "Valley Benchmark";
+    })
+  ];
+
+  stripDebugList = [ "${instPath}/bin" ];
+
+  meta = {
+    description = "The Unigine Valley GPU benchmarking tool";
+    homepage = "https://unigine.com/products/benchmarks/valley/";
+    license = lib.licenses.unfree; # see also: $out/$instPath/documentation/License.pdf
+    maintainers = [ lib.maintainers.kierdavis ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}
+