aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/games/tuxtype/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/games/tuxtype/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/games/tuxtype/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/games/tuxtype/default.nix b/infra/libkookie/nixpkgs/pkgs/games/tuxtype/default.nix
new file mode 100644
index 000000000000..9d04440a1672
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/games/tuxtype/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, librsvg, libxml2, SDL, SDL_image, SDL_mixer, SDL_net, SDL_ttf, t4kcommon }:
+
+stdenv.mkDerivation rec {
+ version = "1.8.3";
+ pname = "tuxtype";
+
+ src = fetchFromGitHub {
+ owner = "tux4kids";
+ repo = "tuxtype";
+ rev = "upstream/${version}";
+ sha256 = "1i33rhi9gpzfml4hd73s18h6p2s8zcr26va2vwf2pqqd9fhdwpsg";
+ };
+
+ postPatch = ''
+ patchShebangs data/scripts/sed-linux.sh
+ patchShebangs data/themes/asturian/scripts/sed-linux.sh
+ patchShebangs data/themes/greek/scripts/sed-linux.sh
+ patchShebangs data/themes/hungarian/scripts/sed-linux.sh
+
+ substituteInPlace Makefile.am \
+ --replace "\$(MKDIR_P) -m 2755 " "\$(MKDIR_P) -m 755 " \
+ --replace "chown root:games \$(DESTDIR)\$(pkglocalstatedir)/words" " "
+
+ # required until the following has been merged:
+ # https://salsa.debian.org/tux4kids-pkg-team/tuxtype/merge_requests/1
+ substituteInPlace configure.ac \
+ --replace 'CFLAGS="$CFLAGS $SDL_IMAGE"' 'CFLAGS="$CFLAGS $SDL_IMAGE_CFLAGS"' \
+ --replace 'PKG_CHECK_MODULES([SDL_ttf],' 'PKG_CHECK_MODULES([SDL_TTF],'
+ '';
+
+ nativeBuildInputs = [ autoreconfHook pkgconfig ];
+ buildInputs = [ librsvg libxml2 SDL SDL_image SDL_mixer SDL_net SDL_ttf t4kcommon ];
+
+ configureFlags = [ "--without-sdlpango" ];
+
+ meta = with stdenv.lib; {
+ description = "An Educational Typing Tutor Game Starring Tux, the Linux Penguin";
+ homepage = "https://github.com/tux4kids/tuxtype";
+ license = licenses.gpl3Plus;
+ maintainers = [ maintainers.aanderse ];
+ platforms = platforms.linux;
+ };
+}