From daba2eb22daef581d5dc5d7d166fb6c396f7ba1c Mon Sep 17 00:00:00 2001 From: Tae Selene Sandoval Murgan Date: Sat, 28 Oct 2023 20:36:20 +0200 Subject: [PATCH] perlPackages.IOTty: Fix build on Darwin Co-authored-by: Stig --- .../perl-modules/IO-Tty-fix-makefile.patch | 13 +++++++++++++ pkgs/top-level/perl-packages.nix | 1 + 2 files changed, 14 insertions(+) create mode 100644 pkgs/development/perl-modules/IO-Tty-fix-makefile.patch diff --git a/pkgs/development/perl-modules/IO-Tty-fix-makefile.patch b/pkgs/development/perl-modules/IO-Tty-fix-makefile.patch new file mode 100644 index 000000000000..65c6d238bdb3 --- /dev/null +++ b/pkgs/development/perl-modules/IO-Tty-fix-makefile.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.PL b/Makefile.PL +index eaf47e0..32766d7 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -146,7 +146,7 @@ extern "C" + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $f (); +-char (*f) (); ++char f; + + #ifdef F77_DUMMY_MAIN + # ifdef __cplusplus diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 8d02ad89658e..b735e7bd8966 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -12950,6 +12950,7 @@ with self; { url = "mirror://cpan/authors/id/T/TO/TODDR/IO-Tty-1.17.tar.gz"; hash = "sha256-pfGoMCC8W13WwbVw9Ix1RuCo9/rBCgaHQLA5Ja2eFOg="; }; + patches = [ ../development/perl-modules/IO-Tty-fix-makefile.patch ]; doCheck = !stdenv.isDarwin; # openpty fails in the sandbox meta = { description = "Low-level allocate a pseudo-Tty, import constants";