2021-01-17 08:49:22 +03:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, librsvg, libxml2, SDL, SDL_image, SDL_mixer, SDL_net, SDL_ttf, t4kcommon }:
|
2019-02-09 22:00:46 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.8.3";
|
2019-02-16 05:42:18 +03:00
|
|
|
pname = "tuxtype";
|
2019-02-09 22:00:46 +03:00
|
|
|
|
2019-02-16 05:42:18 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tux4kids";
|
|
|
|
repo = "tuxtype";
|
|
|
|
rev = "upstream/${version}";
|
|
|
|
sha256 = "1i33rhi9gpzfml4hd73s18h6p2s8zcr26va2vwf2pqqd9fhdwpsg";
|
2019-02-09 22:00:46 +03:00
|
|
|
};
|
|
|
|
|
2019-02-16 05:42:18 +03:00
|
|
|
postPatch = ''
|
2019-02-09 22:00:46 +03:00
|
|
|
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" " "
|
|
|
|
|
2019-02-16 05:42:18 +03:00
|
|
|
# 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],'
|
2019-02-09 22:00:46 +03:00
|
|
|
'';
|
|
|
|
|
2021-01-17 08:49:22 +03:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2019-02-16 05:42:18 +03:00
|
|
|
buildInputs = [ librsvg libxml2 SDL SDL_image SDL_mixer SDL_net SDL_ttf t4kcommon ];
|
2019-02-09 22:00:46 +03:00
|
|
|
|
|
|
|
configureFlags = [ "--without-sdlpango" ];
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2019-02-09 22:00:46 +03:00
|
|
|
description = "An Educational Typing Tutor Game Starring Tux, the Linux Penguin";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://github.com/tux4kids/tuxtype";
|
2019-02-09 22:00:46 +03:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.aanderse ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|