about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/tuxpaint/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/tuxpaint/default.nix')
-rw-r--r--nixpkgs/pkgs/games/tuxpaint/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/tuxpaint/default.nix b/nixpkgs/pkgs/games/tuxpaint/default.nix
new file mode 100644
index 000000000000..ddf0782b210d
--- /dev/null
+++ b/nixpkgs/pkgs/games/tuxpaint/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, SDL, SDL_image, SDL_ttf, SDL_mixer, libpng,
+  cairo, librsvg, gettext, libpaper, fribidi, pkgconfig, gperf }:
+
+stdenv.mkDerivation rec {
+  version = "0.9.22";
+  name = "tuxpaint-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/tuxpaint/${version}/${name}.tar.gz";
+    sha256 = "1qrbrdck9yxpcg3si6jb9i11w8lw9h4hqad0pfaxgyiniqpr7gca";
+  };
+
+  nativeBuildInputs = [ SDL SDL_image SDL_ttf SDL_mixer libpng cairo
+    librsvg gettext libpaper fribidi pkgconfig gperf ];
+  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 = ''
+    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/;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = with stdenv.lib.maintainers; [ woffs ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}