diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 32f4f4583378..42226374159f 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -18175,9 +18175,11 @@ with self; { url = "mirror://cpan/authors/id/N/NJ/NJH/MusicBrainz-DiscID-0.06.tar.gz"; hash = "sha256-ugtu0JiX/1Y7pZhy7pNxW+83FXUVsZt8bW8obmVI7Ks="; }; - perlPreHook = lib.optionalString stdenv.isi686 "export LD=$CC"; # fix undefined reference to `__stack_chk_fail_local' - # Makefile.PL in this package uses which to find pkg-config -- make it use path instead - patchPhase = ''sed -ie 's/`which pkg-config`/"pkg-config"/' Makefile.PL''; + # Makefile.PL in this package uses which to find pkg-config -- make it use envvar instead + postPatch = '' + substituteInPlace Makefile.PL \ + --replace-fail '`which pkg-config`' "'$PKG_CONFIG'" + ''; doCheck = false; # The main test performs network access nativeBuildInputs = [ pkgs.pkg-config ]; propagatedBuildInputs = [ pkgs.libdiscid ];