22 if stdenv.hostPlatform.system == "x86_64-linux" then
24 else if stdenv.hostPlatform.system == "i686-linux" then
27 throw "Unsupported platform ${stdenv.hostPlatform.system}";
29 desktopItem = makeDesktopItem {
32 genericName = "A GPU Stress test tool from the UNIGINE";
34 desktopName = "Heaven Benchmark";
39 pname = "unigine-heaven";
43 url = "https://assets.unigine.com/d/Unigine_Heaven-${version}.run";
44 sha256 = "19rndwwxnb9k2nw9h004hyrmr419471s0fp25yzvvc6rkd521c0v";
49 sh $src --target $name
51 mkdir -p $out/lib/unigine/heaven/bin
53 mkdir -p $out/share/applications/
54 mkdir -p $out/share/icons/hicolor
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
64 cp -R $name/data $name/documentation $out/lib/unigine/heaven
66 wrapProgram $out/bin/heaven --prefix LD_LIBRARY_PATH : ${libglvnd}/lib:$out/bin:${openal}/lib --run "cd $out/lib/unigine/heaven/"
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
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
75 ln -s ${desktopItem}/share/applications/* $out/share/applications
101 description = "Unigine Heaven GPU benchmarking tool";
102 homepage = "https://benchmark.unigine.com/heaven";
103 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
104 license = lib.licenses.unfree;
105 maintainers = [ lib.maintainers.BarinovMaxim ];
106 platforms = [ "x86_64-linux" "i686-linux" ];
107 mainProgram = "heaven";