about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-05-20 01:58:56 -0700
committerAdam Joseph <adam@westernsemico.com>2022-05-20 02:00:26 -0700
commitbe15e454d899c89cf3c9e85c2376fb8cdca689ca (patch)
tree49459512b0b45d103aeb728d8db258c0cb9865a1
parent50e4586857f457befbee0c004856b26b3f3b98ca (diff)
ber-metaocaml: apply glibc>=2.34 fix from ocaml/4.07.nix
-rw-r--r--pkgs/development/compilers/ocaml/ber-metaocaml.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ocaml/ber-metaocaml.nix b/pkgs/development/compilers/ocaml/ber-metaocaml.nix
index 92fcb7c04c76d..edb3c2e385f65 100644
--- a/pkgs/development/compilers/ocaml/ber-metaocaml.nix
+++ b/pkgs/development/compilers/ocaml/ber-metaocaml.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, fetchurl
 , ncurses
 , libX11, xorgproto, buildEnv
+, fetchpatch
 }:
 
 let
@@ -41,6 +42,17 @@ stdenv.mkDerivation rec {
   dontStrip = true;
   buildInputs = [ ncurses ] ++ optionals useX11 x11deps;
 
+  patches = [
+    # glibc 2.34 changed SIGSTKSZ from a #define'd integer to an
+    # expression involving a function call.  This broke all code that
+    # used SIGSTKSZ as the size of a statically-allocated array.  This
+    # patch is also applied by the ocaml/4.07.nix expression.
+    (fetchpatch {
+      url = "https://github.com/ocaml/ocaml/commit/00b8c4d503732343d5d01761ad09650fe50ff3a0.patch";
+      sha256 = "sha256:02cfya5ff5szx0fsl5x8ax76jyrla9zmf3qxavf3adhwq5ssrfcv";
+    })
+  ];
+
   postConfigure = ''
     tar -xvzf $metaocaml
     cd ${pname}-${version}