32 superposition = stdenv.mkDerivation rec{
33 pname = "unigine-superposition";
37 url = "https://assets.unigine.com/d/Unigine_Superposition-${version}.run";
38 sha256 = "12hzlz792pf8pvxf13fww3qhahqzwzkxq9q3mq20hbhvaphbg7nd";
68 bash $src --target $name --noexec
69 mkdir -p $out/bin $out/lib/unigine/superposition/
70 cp -r $name/* $out/lib/unigine/superposition/
71 echo "exec $out/lib/unigine/superposition/Superposition" >> $out/bin/superposition
72 chmod +x $out/bin/superposition
73 wrapProgram $out/lib/unigine/superposition/Superposition \
74 --set QT_XKB_CONFIG_ROOT ${xkeyboard_config} \
75 --run "cd $out/lib/unigine/superposition/"
79 dontWrapQtApps = true;
82 cp -f $name/bin/superposition $out/lib/unigine/superposition/bin/superposition
86 desktopItem = makeDesktopItem {
87 name = "Superposition";
88 exec = "Superposition";
89 genericName = "A GPU Stress test tool from the UNIGINE";
90 icon = "Superposition";
91 desktopName = "Superposition Benchmark";
96 # We can patch the "/bin/superposition", but "/bin/launcher" checks it for changes.
97 # For that we need use a buildFHSEnv.
100 name = "Superposition";
124 runScript = "superposition";
126 extraInstallCommands = ''
128 mkdir -p $out/share/icons/hicolor $out/share/applications
129 # create .desktop file
130 ln -s ${desktopItem}/share/applications/* $out/share/applications
131 # install Superposition.desktop and icon
132 cp ${superposition}/lib/unigine/superposition/Superposition.png $out/share/icons/
133 for RES in 16 24 32 48 64 128 256; do
134 mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps
135 cp ${superposition}/lib/unigine/superposition/icons/superposition_icon_$RES.png $out/share/icons/hicolor/"$RES"x"$RES"/apps/Superposition.png
140 description = "Unigine Superposition GPU benchmarking tool";
141 homepage = "https://benchmark.unigine.com/superposition";
142 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
143 license = lib.licenses.unfree;
144 maintainers = [ lib.maintainers.BarinovMaxim ];
145 platforms = [ "x86_64-linux" ];
146 mainProgram = "Superposition";