Merge pull request #145210 from veprbl/pr/mcfm_zhf_2111

lhapdf: fix compilation with gccStdenv on darwin
This commit is contained in:
Domen Kožar 2021-11-09 14:39:04 -06:00 committed by GitHub
commit a342531d5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-fS8CZ+LWWw3e4EhVOzQtfIk6bbq+HjJsrWLeABDdgQw=";
};
# The Apple SDK only exports locale_t from xlocale.h whereas glibc
# had decided that xlocale.h should be a part of locale.h
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.cc.isGNU) ''
substituteInPlace src/GridPDF.cc --replace '#include <locale>' '#include <xlocale.h>'
'';
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python ];