sdrangel: fix build on x86_64-darwin
[NixPkgs.git] / pkgs / games / tuxtype / default.nix
blob822dac9808dcc400a55d54e66c0c6f877be2faa9
1 { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, librsvg, libxml2, SDL, SDL_image, SDL_mixer, SDL_net, SDL_ttf, t4kcommon }:
3 stdenv.mkDerivation rec {
4   version = "1.8.3";
5   pname = "tuxtype";
7   src = fetchFromGitHub {
8     owner = "tux4kids";
9     repo = "tuxtype";
10     rev = "upstream/${version}";
11     sha256 = "1i33rhi9gpzfml4hd73s18h6p2s8zcr26va2vwf2pqqd9fhdwpsg";
12   };
14   postPatch = ''
15     patchShebangs data/scripts/sed-linux.sh
16     patchShebangs data/themes/asturian/scripts/sed-linux.sh
17     patchShebangs data/themes/greek/scripts/sed-linux.sh
18     patchShebangs data/themes/hungarian/scripts/sed-linux.sh
20     substituteInPlace Makefile.am \
21       --replace "\$(MKDIR_P) -m 2755 " "\$(MKDIR_P) -m 755 " \
22       --replace "chown root:games \$(DESTDIR)\$(pkglocalstatedir)/words" " "
24     # required until the following has been merged:
25     # https://salsa.debian.org/tux4kids-pkg-team/tuxtype/merge_requests/1
26     substituteInPlace configure.ac \
27       --replace 'CFLAGS="$CFLAGS $SDL_IMAGE"' 'CFLAGS="$CFLAGS $SDL_IMAGE_CFLAGS"' \
28       --replace 'PKG_CHECK_MODULES([SDL_ttf],' 'PKG_CHECK_MODULES([SDL_TTF],'
29   '';
31   nativeBuildInputs = [ autoreconfHook pkg-config ];
32   buildInputs = [ librsvg libxml2 SDL SDL_image SDL_mixer SDL_net SDL_ttf t4kcommon ];
34   configureFlags = [ "--without-sdlpango" ];
36   meta = with lib; {
37     description = "An Educational Typing Tutor Game Starring Tux, the Linux Penguin";
38     mainProgram = "tuxtype";
39     homepage = "https://github.com/tux4kids/tuxtype";
40     license = licenses.gpl3Plus;
41     maintainers = [ maintainers.aanderse ];
42     platforms = platforms.linux;
43   };