From 034d565493b0383cb02800cf8449700e76dbc9bb Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 9 Nov 2021 10:30:57 -0500 Subject: [PATCH] lhapdf: fix compilation with gccStdenv on darwin This is used to compile against MCFM that is built with GCC --- pkgs/development/libraries/physics/lhapdf/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/physics/lhapdf/default.nix b/pkgs/development/libraries/physics/lhapdf/default.nix index db185e299197..a3753d86356e 100644 --- a/pkgs/development/libraries/physics/lhapdf/default.nix +++ b/pkgs/development/libraries/physics/lhapdf/default.nix @@ -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 ' '#include ' + ''; + nativeBuildInputs = [ makeWrapper ]; buildInputs = [ python ];