summary refs log tree commit diff
path: root/pkgs/development/libraries/physics
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2023-02-11 16:13:08 -0500
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2023-02-11 16:13:08 -0500
commit092a6d7fc7239bb206cf4724efac07f7de2b0275 (patch)
tree3490adfe4433981f42d233f21e66638a069c9ba4 /pkgs/development/libraries/physics
parent6fe0b2308609dfcb5eea9c0aa287917ca6838bfe (diff)
downloadnixpkgs-092a6d7fc7239bb206cf4724efac07f7de2b0275.tar
nixpkgs-092a6d7fc7239bb206cf4724efac07f7de2b0275.tar.gz
nixpkgs-092a6d7fc7239bb206cf4724efac07f7de2b0275.tar.bz2
nixpkgs-092a6d7fc7239bb206cf4724efac07f7de2b0275.tar.lz
nixpkgs-092a6d7fc7239bb206cf4724efac07f7de2b0275.tar.xz
nixpkgs-092a6d7fc7239bb206cf4724efac07f7de2b0275.tar.zst
nixpkgs-092a6d7fc7239bb206cf4724efac07f7de2b0275.zip
lhapdf: fix python module on darwin
Diffstat (limited to 'pkgs/development/libraries/physics')
-rw-r--r--pkgs/development/libraries/physics/lhapdf/default.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/development/libraries/physics/lhapdf/default.nix b/pkgs/development/libraries/physics/lhapdf/default.nix
index 60b5a0b581d..00f548806fc 100644
--- a/pkgs/development/libraries/physics/lhapdf/default.nix
+++ b/pkgs/development/libraries/physics/lhapdf/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, python, makeWrapper }:
+{ lib, stdenv, fetchurl, fetchpatch, python, makeWrapper }:
 
 stdenv.mkDerivation rec {
   pname = "lhapdf";
@@ -9,6 +9,22 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-V0Nc1pXilwZdU+ab0pCQdlyTSTa2qXX/jFWXZvIjA1k=";
   };
 
+  patches = [
+    # avoid silent compilation failures
+    (fetchpatch {
+      name = "lhapdf-propagate_returncode.patch";
+      url = "https://gitlab.com/hepcedar/lhapdf/-/commit/2806ac795c7e4a69281d9c2a6a8bba5423f37e74.diff";
+      hash = "sha256-j8txlt0n5gpUy9zeuWKx+KRXL3HMMaGcwOxr908966k=";
+    })
+
+    # workaround "ld: -stack_size option can only be used when linking a main executable" on darwin
+    (fetchpatch {
+      name = "lhapdf-Wl_stack_size.patch";
+      url = "https://gitlab.com/hepcedar/lhapdf/-/commit/463764d6613837b6ab57ecaf13bc61be2349e5e4.diff";
+      hash = "sha256-AbDs7gtU5HsJG5n/solMzu2bjX1juxfUIqIt5KmNffU=";
+    })
+  ];
+
   # 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) ''