ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / games / tuxpaint / default.nix
blob638fa170f50fd5afc150e6d8e043de48f82733ea
1 { lib, stdenv, fetchurl, SDL, SDL_gfx, SDL_image, SDL_ttf, SDL_mixer, libpng
2 , libimagequant, cairo, librsvg, gettext, libpaper, fribidi, pkg-config, gperf
3 , imagemagick
4 }:
6 stdenv.mkDerivation rec {
7   version = "0.9.27";
8   pname = "tuxpaint";
10   src = fetchurl {
11     url = "mirror://sourceforge/tuxpaint/${version}/${pname}-${version}.tar.gz";
12     sha256 = "sha256-qyuA6J34gijNDsCmyQtJ1UPLFXqjj7kMvTop8AFAVXo=";
13   };
15   nativeBuildInputs = [
16     SDL SDL_gfx SDL_image SDL_ttf SDL_mixer libpng cairo libimagequant librsvg
17     gettext libpaper fribidi pkg-config gperf imagemagick
18   ];
19   hardeningDisable = [ "format" ];
20   makeFlags = [ "GPERF=${gperf}/bin/gperf"
21                 "PREFIX=$$out"
22                 "COMPLETIONDIR=$$out/share/bash-completion/completions"
23               ];
25   patches = [ ./tuxpaint-completion.diff ];
26   postPatch = ''
27     grep -Zlr include.*SDL . | xargs -0 sed -i -e 's,"SDL,"SDL/SDL,'
28   '';
30   # stamps
31   stamps = fetchurl {
32     url = "mirror://sourceforge/project/tuxpaint/tuxpaint-stamps/2021-11-25/tuxpaint-stamps-2021.11.25.tar.gz";
33     sha256 = "sha256-y1XuIbLSW0QO4has+rC7jZBq8cma28d+jbEe7DBYnVI=";
34   };
36   postInstall = ''
37     # Install desktop file
38     mkdir -p $out/share/applications
39     cp hildon/tuxpaint.xpm $out/share/pixmaps
40     sed -e "s+Exec=tuxpaint+Exec=$out/bin/tuxpaint+" < src/tuxpaint.desktop > $out/share/applications/tuxpaint.desktop
42     # Install stamps
43     tar xzf $stamps
44     cd tuxpaint-stamps-*
45     make install-all PREFIX=$out
46     rm -rf $out/share/tuxpaint/stamps/military
47   '';
49   enableParallelBuilding = true;
51   meta = {
52     description = "Open Source Drawing Software for Children";
53     homepage = "http://www.tuxpaint.org/";
54     license = lib.licenses.gpl3Plus;
55     maintainers = with lib.maintainers; [ woffs ];
56     platforms = lib.platforms.linux;
57   };