2022-03-30 09:31:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, SDL, SDL_gfx, SDL_image, SDL_ttf, SDL_mixer, libpng
|
|
|
|
, libimagequant, cairo, librsvg, gettext, libpaper, fribidi, pkg-config, gperf
|
|
|
|
, imagemagick
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.9.28";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "tuxpaint";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-11-21 17:40:18 +00:00
|
|
|
url = "mirror://sourceforge/tuxpaint/${version}/${pname}-${version}-sdl1.tar.gz";
|
|
|
|
sha256 = "sha256-b4Ru9GqyGf2jMmM24szGXO2vbSxCwvPmA6tgEUWhhos=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
SDL SDL_gfx SDL_image SDL_ttf SDL_mixer libpng cairo libimagequant librsvg
|
|
|
|
gettext libpaper fribidi pkg-config gperf imagemagick
|
|
|
|
];
|
2020-04-24 23:36:52 +00: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 {
|
2022-11-21 17:40:18 +00:00
|
|
|
url = "mirror://sourceforge/project/tuxpaint/tuxpaint-stamps/2022-06-04/tuxpaint-stamps-2022.06.04.tar.gz";
|
|
|
|
sha256 = "sha256-hCBlV2+uVUNY4A5R1xpJJhamSQsStZIigGdHfCh6C/g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-10-07 09:15:18 +00: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 22:18:51 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
# Install stamps
|
2020-04-24 23:36:52 +00:00
|
|
|
tar xzf $stamps
|
2022-03-30 09:31:56 +00:00
|
|
|
cd tuxpaint-stamps-*
|
2020-04-24 23:36:52 +00:00
|
|
|
make install-all PREFIX=$out
|
|
|
|
rm -rf $out/share/tuxpaint/stamps/military
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Open Source Drawing Software for Children";
|
|
|
|
homepage = "http://www.tuxpaint.org/";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ woffs ];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|