From a2e1f82167a613134a7e24d461595f3a8b90d402 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 20 Jun 2025 19:01:33 +0000 Subject: [PATCH] perl540: fix cross compilation --- .../interpreters/perl/cross-fdopendir.patch | 21 +++++++++++++++++++ .../interpreters/perl/interpreter.nix | 9 ++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/interpreters/perl/cross-fdopendir.patch diff --git a/pkgs/development/interpreters/perl/cross-fdopendir.patch b/pkgs/development/interpreters/perl/cross-fdopendir.patch new file mode 100644 index 000000000000..f46d23006b4c --- /dev/null +++ b/pkgs/development/interpreters/perl/cross-fdopendir.patch @@ -0,0 +1,21 @@ +From f702c387e6940fab3801d7562a668b974a2b3a8f Mon Sep 17 00:00:00 2001 +From: Audrey Dutcher +Date: Fri, 30 May 2025 12:29:54 -0700 +Subject: [PATCH] add d_fdopendir configuration + +--- + cnf/configure_func.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cnf/configure_func.sh b/cnf/configure_func.sh +index 4c13e4c..b24fe03 100644 +--- a/cnf/configure_func.sh ++++ b/cnf/configure_func.sh +@@ -83,6 +83,7 @@ checkfunc d_fchmodat 'fchmodat' "0,NULL,0,0" 'unistd.h sys/stat.h' + checkfunc d_fchown 'fchown' "0,0,0" 'unistd.h' + checkfunc d_fcntl 'fcntl' "0,0" 'unistd.h fcntl.h' + checkfunc d_fdclose 'fdclose' "NULL,NULL" 'stdio.h' ++checkfunc d_fdopendir 'fdopendir' "0" 'dirent.h' + checkfunc d_ffs 'ffs' "0" 'strings.h' + checkfunc d_ffsl 'ffsl' "0" 'strings.h' + checkfunc d_fgetpos 'fgetpos' "NULL, 0" 'stdio.h' diff --git a/pkgs/development/interpreters/perl/interpreter.nix b/pkgs/development/interpreters/perl/interpreter.nix index dbeb4fa69d85..57306ce6d551 100644 --- a/pkgs/development/interpreters/perl/interpreter.nix +++ b/pkgs/development/interpreters/perl/interpreter.nix @@ -317,15 +317,20 @@ stdenv.mkDerivation ( }; } // lib.optionalAttrs crossCompiling rec { - crossVersion = "1.6"; + crossVersion = "1.6.2"; perl-cross-src = fetchFromGitHub { name = "perl-cross-${crossVersion}"; owner = "arsv"; repo = "perl-cross"; rev = crossVersion; - sha256 = "sha256-TVDLxw8ctl64LSfLfB4/WLYlSTO31GssSzmdVfqkBmg="; + hash = "sha256-mG9ny+eXGBL4K/rXqEUPSbar+4Mq4IaQrGRFIHIyAAw="; }; + patches = [ + # fixes build failure due to missing d_fdopendir/HAS_FDOPENDIR configure option + # https://github.com/arsv/perl-cross/pull/159 + ./cross-fdopendir.patch + ]; depsBuildBuild = [ buildPackages.stdenv.cc