3
0
Fork 0
forked from mirrors/nixpkgs

lhapdf: fix compilation with gccStdenv on darwin

This is used to compile against MCFM that is built with GCC
This commit is contained in:
Dmitry Kalinkin 2021-11-09 10:30:57 -05:00
parent 3119a60230
commit 034d565493
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

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