about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix b/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix
index 143f72541b4d..a3753d86356e 100644
--- a/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix
+++ b/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix
@@ -2,13 +2,19 @@
 
 stdenv.mkDerivation rec {
   pname = "lhapdf";
-  version = "6.3.0";
+  version = "6.4.0";
 
   src = fetchurl {
     url = "https://www.hepforge.org/archive/lhapdf/LHAPDF-${version}.tar.gz";
-    sha256 = "0pcvigpjqzfng06n98bshhhpimiqfg416ak8lz8jdgp6nxr8fkgd";
+    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 ];