Merge pull request #181944 from tomfitzhenry/sgtpuzzles-cmake

sgtpuzzles: bump 2 years, and fix icons

authored by 7c6f434c and committed by GitHub 3aa086b0 2e6fbc1a

+16 -23
+16 -23
pkgs/games/sgt-puzzles/default.nix
··· 1 1 { lib, stdenv, fetchurl, desktop-file-utils 2 - , gtk3, libX11 3 - , makeWrapper, pkg-config, perl, autoreconfHook, wrapGAppsHook 2 + , gtk3, libX11, cmake, imagemagick 3 + , pkg-config, perl, wrapGAppsHook 4 4 }: 5 5 6 6 stdenv.mkDerivation rec { 7 7 pname = "sgt-puzzles"; 8 - version = "20200610.9aa7b7c"; 8 + version = "20220613.387d323"; 9 9 10 10 src = fetchurl { 11 11 url = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${version}.tar.gz"; 12 - sha256 = "0rrd1c77ar91zqy4rr4xp1z7x3ywnshlac99cga4hnrgwb7vwl3f"; 12 + hash = "sha256-Vcm7gxC9R7vvLkgkHblvEOONGLkYSHGMRfSBktgN/oQ="; 13 13 }; 14 14 15 15 sgt-puzzles-menu = fetchurl { 16 - url = "https://raw.githubusercontent.com/Oleh-Kravchenko/portage/master/games-puzzle/sgt-puzzles/files/sgt-puzzles.menu"; 16 + url = "https://raw.githubusercontent.com/gentoo/gentoo/720e614d0107e86fc1e520bac17726578186843d/games-puzzle/sgt-puzzles/files/sgt-puzzles.menu"; 17 17 sha256 = "088w0x9g3j8pn725ix8ny8knhdsfgjr3hpswsh9fvfkz5vlg2xkm"; 18 18 }; 19 19 20 - nativeBuildInputs = [ autoreconfHook desktop-file-utils makeWrapper 21 - pkg-config perl wrapGAppsHook ]; 20 + nativeBuildInputs = [ 21 + cmake 22 + desktop-file-utils 23 + imagemagick 24 + perl 25 + pkg-config 26 + wrapGAppsHook 27 + ]; 22 28 23 29 buildInputs = [ gtk3 libX11 ]; 24 30 25 - makeFlags = [ "prefix=$(out)" "gamesdir=$(out)/bin"]; 26 - 27 - preInstall = '' 28 - mkdir -p "$out"/{bin,share/doc/sgtpuzzles} 29 - cp gamedesc.txt LICENCE README "$out/share/doc/sgtpuzzles" 30 - ''; 31 - 32 31 postInstall = '' 33 32 for i in $(basename -s $out/bin/*); do 34 33 35 34 ln -s $out/bin/$i $out/bin/sgt-puzzle-$i 36 - install -Dm644 icons/$i-48d24.png -t $out/share/icons/hicolor/48x48/apps/ 35 + install -Dm644 icons/$i-96d24.png -t $out/share/icons/hicolor/96x96/apps/ 37 36 38 37 # Generate/validate/install .desktop files. 39 38 echo "[Desktop Entry]" > $i.desktop ··· 43 42 --set-key Name --set-value $i \ 44 43 --set-key Comment --set-value "${meta.description}" \ 45 44 --set-key Categories --set-value "Game;LogicGame;X-sgt-puzzles;" \ 46 - --set-key Icon --set-value $out/share/icons/hicolor/48x48/apps/$i-48d24 \ 45 + --set-key Icon --set-value $out/share/icons/hicolor/96x96/apps/$i-96d24.png \ 47 46 $i.desktop 48 47 done 49 48 ··· 57 56 install -Dm644 ${sgt-puzzles-menu} -t $out/etc/xdg/menus/applications-merged/ 58 57 ''; 59 58 60 - preConfigure = '' 61 - perl mkfiles.pl 62 - export NIX_LDFLAGS="$NIX_LDFLAGS -lX11" 63 - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error" 64 - cp Makefile.gtk Makefile 65 - ''; 66 59 meta = with lib; { 67 60 description = "Simon Tatham's portable puzzle collection"; 68 61 license = licenses.mit; 69 - maintainers = [ maintainers.raskin ]; 62 + maintainers = with maintainers; [ raskin tomfitzhenry ]; 70 63 platforms = platforms.linux; 71 64 homepage = "https://www.chiark.greenend.org.uk/~sgtatham/puzzles/"; 72 65 };