From dc6b36b994c05debb881c049fadaae353507e0b7 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 11 Sep 2018 00:25:49 +0200 Subject: [PATCH 1/2] perl-Module-Build-XSUtil: fix darwin build While building the tests LD gets called with -mmacosx-version-min=10.10 which is a CC flag, causing the build to fail with LD=ld. This is pretty common with perl packages. /cc ZHF #45961 --- pkgs/top-level/perl-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 6bf58f5db28..14ac1ca2e2c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -9650,11 +9650,12 @@ let sha256 = "004ly9xxjlsbrr2vhxsa1n84z3034gxrzr7z0wl45szd8v1v6qwh"; }; buildInputs = [ CaptureTiny CwdGuard FileCopyRecursiveReduced ]; + propagatedBuildInputs = [ DevelCheckCompiler ]; + perlPreHook = "export LD=$CC"; meta = { description = "A Module::Build class for building XS modules"; license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; }; - propagatedBuildInputs = [ DevelCheckCompiler ]; }; ModuleCPANTSAnalyse = buildPerlPackage rec { From 5e8fd8792b043c437c07e353f20a6ccb09f8283d Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 11 Sep 2018 00:48:15 +0200 Subject: [PATCH 2/2] perl-Mouse: fix darwin build /cc ZHF #45961 --- pkgs/top-level/perl-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 14ac1ca2e2c..2ec4efed886 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -10884,6 +10884,7 @@ let sha256 = "1j3048ip691j91rdig6wrlg6i4jdzhszxmz5pi2g7n355rl2w00l"; }; buildInputs = [ DevelPPPort ModuleBuildXSUtil TestException TestFatal TestLeakTrace TestOutput TestRequires TryTiny self.version ]; + perlPreHook = "export LD=$CC"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isi686 "-fno-stack-protector"; hardeningDisable = stdenv.lib.optional stdenv.isi686 "stackprotector"; };