3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/games/tuxpaint/default.nix

53 lines
1.7 KiB
Nix
Raw Normal View History

2021-01-15 04:31:39 +00:00
{ lib, stdenv, fetchurl, SDL, SDL_image, SDL_ttf, SDL_mixer, libpng,
cairo, librsvg, gettext, libpaper, fribidi, pkg-config, gperf, imagemagick }:
2018-04-24 20:25:13 +01:00
stdenv.mkDerivation rec {
2020-06-06 17:15:15 +01:00
version = "0.9.24";
pname = "tuxpaint";
2018-04-24 20:25:13 +01:00
src = fetchurl {
url = "mirror://sourceforge/tuxpaint/${version}/${pname}-${version}.tar.gz";
2020-06-06 17:15:15 +01:00
sha256 = "06m1lg2pikfkmassfvvrbwqffwgixcmjh1li6akaldgkalpmfql7";
2018-04-24 20:25:13 +01:00
};
nativeBuildInputs = [ SDL SDL_image SDL_ttf SDL_mixer libpng cairo
librsvg gettext libpaper fribidi pkg-config gperf imagemagick ];
2018-04-24 20:25:13 +01:00
hardeningDisable = [ "format" ];
makeFlags = [ "GPERF=${gperf}/bin/gperf"
"PREFIX=$$out"
"COMPLETIONDIR=$$out/share/bash-completion/completions"
];
patches = [ ./tuxpaint-completion.diff ];
postPatch = ''
grep -Zlr include.*SDL . | xargs -0 sed -i -e 's,"SDL,"SDL/SDL,'
'';
# stamps
stamps = fetchurl {
url = "mirror://sourceforge/project/tuxpaint/tuxpaint-stamps/2014-08-23/tuxpaint-stamps-2014.08.23.tar.gz";
sha256 = "0rhlwrjz44wp269v3rid4p8pi0i615pzifm1ym6va64gn1bms06q";
};
postInstall = ''
2020-05-04 20:56:08 +01:00
# Install desktop file
mkdir -p $out/share/applications
cp hildon/tuxpaint.xpm $out/share/pixmaps
sed -e "s+Exec=tuxpaint+Exec=$out/bin/tuxpaint+" < src/tuxpaint.desktop > $out/share/applications/tuxpaint.desktop
2021-01-15 04:31:39 +00:00
2020-05-04 20:56:08 +01:00
# Install stamps
2018-04-24 20:25:13 +01:00
tar xzf $stamps
cd tuxpaint-stamps-2014.08.23
make install-all PREFIX=$out
rm -rf $out/share/tuxpaint/stamps/military
'';
meta = {
description = "Open Source Drawing Software for Children";
homepage = "http://www.tuxpaint.org/";
2021-01-15 04:31:39 +00:00
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ woffs ];
platforms = lib.platforms.linux;
2018-04-24 20:25:13 +01:00
};
}