From 917b7e5fd2e29346040dc95a39cae17f92eae0dc Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Sep 2021 21:18:53 +0200 Subject: [PATCH] ocaml: fix build w/glibc-2.34 ChangeLog: https://hydra.nixos.org/build/154122673 --- pkgs/development/compilers/ocaml/4.12.nix | 5 +++++ pkgs/development/compilers/ocaml/generic.nix | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ocaml/4.12.nix b/pkgs/development/compilers/ocaml/4.12.nix index 0662e66e0b6a..949ca185a3c3 100644 --- a/pkgs/development/compilers/ocaml/4.12.nix +++ b/pkgs/development/compilers/ocaml/4.12.nix @@ -3,4 +3,9 @@ import ./generic.nix { minor_version = "12"; patch_version = "0"; sha256 = "1hxy349jfa2vkfgmxf6pvd9w4z5bmcgsg0fxfdabcghyvjw9vvir"; + patches = [ + { url = "https://src.fedoraproject.org/rpms/ocaml/raw/129153b85109944bf0b2922949f77ef8f32b39a1/f/0004-Dynamically-allocate-the-alternate-signal-stack-1026.patch"; + sha256 = "sha256-FdQ1HkMKHU9QvgLPUBvMdPiEa7w7IL3+1F3SLv63Gog="; + } + ]; } diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index ec52e56c1faa..debc3d4272a4 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -1,4 +1,4 @@ -{ minor_version, major_version, patch_version +{ minor_version, major_version, patch_version, patches ? [] , ...}@args: let versionNoPatch = "${toString major_version}.${toString minor_version}"; @@ -6,7 +6,7 @@ let safeX11 = stdenv: !(stdenv.isAarch32 || stdenv.isMips || stdenv.hostPlatform.isStatic); in -{ lib, stdenv, fetchurl, ncurses, buildEnv, libunwind +{ lib, stdenv, fetchurl, ncurses, buildEnv, libunwind, fetchpatch , libX11, xorgproto, useX11 ? safeX11 stdenv && !lib.versionAtLeast version "4.09" , aflSupport ? false , flambdaSupport ? false @@ -44,6 +44,8 @@ stdenv.mkDerivation (args // { inherit src; + patches = map fetchpatch patches; + strictDeps = true; prefixKey = "-prefix ";