perl538Packages.MusicBrainzDiscID: fix cross compilation, drop outdated LD envvar

This commit is contained in:
Nick Cao 2024-04-29 15:45:07 -04:00
parent adc9566b32
commit 5009a8a1ed
No known key found for this signature in database

View File

@ -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 ];