From 69345ec37b8da3de94d4262b81bfa08000d35427 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Tue, 19 Dec 2017 01:56:47 +0000 Subject: [PATCH] perlPackages: use ld-is-cc-hook to fix build after #29396 removed `-L path/to/dir/of/libstdc++.so` from ld flags See https://github.com/NixOS/nixpkgs/pull/29396#issuecomment-352600129 Module::Build build helper works correctly when LD is unset (taking LD from Perl config to be `cc`). However, we can not unset LD because this goes contrary to the cross compilation effort, and we can not make it propagate ld-is-cc-hook because it breaks e.g. the build of `libguestfs`. However, #29396 makes LD=ld incompatible with just 3 perl packages; they are individually fixed by this commit. --- pkgs/top-level/perl-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 7b5f3519f2b..d56b4a289a7 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -4849,6 +4849,7 @@ let self = _self // overrides; _self = with self; { url = "mirror://cpan/authors/id/J/JG/JGMYERS/${name}.tar.gz"; sha256 = "834d893aa7db6ce3f158afbd0e432d6ed15a276e0940db0a74be13fd9c4bbbf1"; }; + nativeBuildInputs = [ pkgs.ld-is-cc-hook ]; propagatedBuildInputs = [ ModuleBuild ]; meta = { description = "An Encode::Encoding subclass that detects the encoding of data"; @@ -5162,6 +5163,7 @@ let self = _self // overrides; _self = with self; { url = "mirror://cpan/modules/by-module/ExtUtils/${name}.tar.gz"; sha256 = "1a77hxf2pa8ia9na72rijv1yhpn2bjrdsybwk2dj2l938pl3xn0w"; }; + nativeBuildInputs = [ pkgs.ld-is-cc-hook ]; propagatedBuildInputs = [ CaptureTiny ]; }; @@ -8488,6 +8490,7 @@ let self = _self // overrides; _self = with self; { url = "mirror://cpan/modules/by-module/Math/${name}.tar.gz"; sha256 = "0i9wzvig7ayijc9nvh5x5rryk1jrcj1hcvfmlcj449rnnxx24dav"; }; + nativeBuildInputs = [ pkgs.ld-is-cc-hook ]; propagatedBuildInputs = [ ModuleBuildWithXSpp ExtUtilsXSpp ExtUtilsTypemapsDefault TestDeep ]; };