diff --git a/pkgs/by-name/ti/tinyfugue/package.nix b/pkgs/by-name/ti/tinyfugue/package.nix index 6942bcb05a2e..4ac7ffa50ade 100644 --- a/pkgs/by-name/ti/tinyfugue/package.nix +++ b/pkgs/by-name/ti/tinyfugue/package.nix @@ -2,7 +2,9 @@ lib, stdenv, fetchurl, + fetchpatch, ncurses, + pcre2, zlib, openssl, sslSupport ? true, @@ -31,12 +33,30 @@ stdenv.mkDerivation rec { patches = [ ./fix-build.patch + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/tinyfugue/raw/ce016e8fb60a51de7c9d0c45dad109b3809de048/f/tinyfigue-configure-c99.patch"; + hash = "sha256-Ge6545PCgcvnSgtDChqUQgf6b3BMjNveBAxQ8fAy8f4="; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/tinyfugue/raw/ce016e8fb60a51de7c9d0c45dad109b3809de048/f/tf-50b8.pcre.patch"; + hash = "sha256-T0XiadrviyuvtZZKYG/kXHQSC7RZkLKQGHOMrnfyLVg="; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/tinyfugue/raw/ce016e8fb60a51de7c9d0c45dad109b3809de048/f/tf-50b8-pcre2.patch"; + hash = "sha256-pTtCUwMBk+t4lK0Z1fKPKaQemdpEdVPe2NScpD8QBS8="; + }) ]; + postPatch = '' + # remove bundled old PCRE + rm -rv src/pcre-2.08 + ''; + configureFlags = optional (!sslSupport) "--disable-ssl"; buildInputs = [ ncurses + pcre2 zlib ] ++ optional sslSupport openssl; @@ -45,7 +65,7 @@ stdenv.mkDerivation rec { # gcc-10. Otherwise build fails as: # ld: world.o:/build/tf-50b8/src/socket.h:24: multiple definition of # `world_decl'; command.o:/build/tf-50b8/src/socket.h:24: first defined here - env.NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon -Wno-incompatible-pointer-types -Wno-return-mismatch"; meta = { homepage = "https://tinyfugue.sourceforge.net/";