lol

Merge pull request #165567 from barinov274/ganga

unigine-heaven: init at 4.0

authored by

Bernardo Meurer and committed by
GitHub
6a1cb83b c48e4727

+109
+107
pkgs/applications/graphics/unigine-heaven/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , makeWrapper 5 + , libX11 6 + , libXext 7 + , libXrandr 8 + , freetype 9 + , fontconfig 10 + , libXrender 11 + , libXinerama 12 + , autoPatchelfHook 13 + , libglvnd 14 + , openal 15 + , imagemagick 16 + , makeDesktopItem 17 + }: 18 + let 19 + version = "4.0"; 20 + 21 + arch = 22 + if stdenv.hostPlatform.system == "x86_64-linux" then 23 + "x64" 24 + else if stdenv.hostPlatform.system == "i686-linux" then 25 + "x86" 26 + else 27 + throw "Unsupported platform ${stdenv.hostPlatform.system}"; 28 + 29 + desktopItem = makeDesktopItem { 30 + name = "Heaven"; 31 + exec = "heaven"; 32 + genericName = "A GPU Stress test tool from the UNIGINE"; 33 + icon = "Heaven"; 34 + desktopName = "Heaven Benchmark"; 35 + }; 36 + in 37 + stdenv.mkDerivation 38 + { 39 + pname = "unigine-heaven"; 40 + inherit version; 41 + 42 + src = fetchurl { 43 + url = "https://assets.unigine.com/d/Unigine_Heaven-${version}.run"; 44 + sha256 = "19rndwwxnb9k2nw9h004hyrmr419471s0fp25yzvvc6rkd521c0v"; 45 + }; 46 + 47 + installPhase = 48 + '' 49 + sh $src --target $name 50 + 51 + mkdir -p $out/lib/unigine/heaven/bin 52 + mkdir -p $out/bin 53 + mkdir -p $out/share/applications/ 54 + mkdir -p $out/share/icons/hicolor 55 + 56 + install -m 0755 $name/bin/browser_${arch} $out/lib/unigine/heaven/bin 57 + install -m 0755 $name/bin/libApp{Stereo,Surround,Wall}_${arch}.so $out/lib/unigine/heaven/bin 58 + install -m 0755 $name/bin/libGPUMonitor_${arch}.so $out/lib/unigine/heaven/bin 59 + install -m 0755 $name/bin/libQt{Core,Gui,Network,WebKit,Xml}Unigine_${arch}.so.4 $out/lib/unigine/heaven/bin 60 + install -m 0755 $name/bin/libUnigine_${arch}.so $out/lib/unigine/heaven/bin 61 + install -m 0755 $name/bin/heaven_${arch} $out/lib/unigine/heaven/bin 62 + install -m 0755 $name/heaven $out/bin/heaven 63 + 64 + cp -R $name/data $name/documentation $out/lib/unigine/heaven 65 + 66 + wrapProgram $out/bin/heaven --prefix LD_LIBRARY_PATH : ${libglvnd}/lib:$out/bin:${openal}/lib --run "cd $out/lib/unigine/heaven/" 67 + 68 + convert $out/lib/unigine/heaven/data/launcher/icon.png -resize 128x128 $out/share/icons/Heaven.png 69 + for RES in 16 24 32 48 64 128 256 70 + do 71 + mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps 72 + convert $out/lib/unigine/heaven/data/launcher/icon.png -resize "$RES"x"$RES" $out/share/icons/hicolor/"$RES"x"$RES"/apps/Heaven.png 73 + done 74 + 75 + ln -s ${desktopItem}/share/applications/* $out/share/applications 76 + ''; 77 + 78 + nativeBuildInputs = 79 + [ 80 + autoPatchelfHook 81 + makeWrapper 82 + imagemagick 83 + ]; 84 + 85 + buildInputs = 86 + [ 87 + libX11 88 + stdenv.cc.cc 89 + libXext 90 + libXrandr 91 + freetype 92 + fontconfig 93 + libXrender 94 + libXinerama 95 + ]; 96 + 97 + dontUnpack = true; 98 + 99 + meta = 100 + { 101 + description = "The Unigine Heaven GPU benchmarking tool"; 102 + homepage = "https://benchmark.unigine.com/heaven"; 103 + license = lib.licenses.unfree; 104 + maintainers = [ lib.maintainers.BarinovMaxim ]; 105 + platforms = [ "x86_64-linux" "i686-linux" ]; 106 + }; 107 + }
+2
pkgs/top-level/all-packages.nix
··· 29669 29669 29670 29670 unigine-valley = callPackage ../applications/graphics/unigine-valley { }; 29671 29671 29672 + unigine-heaven = callPackage ../applications/graphics/unigine-heaven { }; 29673 + 29672 29674 unipicker = callPackage ../applications/misc/unipicker { }; 29673 29675 29674 29676 unison = callPackage ../applications/networking/sync/unison {