diff options
author | Izorkin <izorkin@elven.pw> | 2022-07-13 22:17:35 +0300 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@sap.com> | 2022-07-14 14:13:08 +0200 |
commit | a59654ade0f13498c7dc907f320d80790b0bb9b4 (patch) | |
tree | 9e6b8243d45667de7f60f65f2cc2a9edf2f197d9 /pkgs/development/libraries/libevent | |
parent | c16db99d3b38a558caabd66f4d59621ed6c7f49b (diff) |
libevent: fix build with libressl 3.5.x
Diffstat (limited to 'pkgs/development/libraries/libevent')
-rw-r--r-- | pkgs/development/libraries/libevent/default.nix | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix index 24ded54d8e973..bd5edec68a06f 100644 --- a/pkgs/development/libraries/libevent/default.nix +++ b/pkgs/development/libraries/libevent/default.nix @@ -1,9 +1,8 @@ { lib, stdenv, fetchurl, findutils, fixDarwinDylibNames -, sslSupport? true, openssl +, sslSupport ? true, openssl +, fetchpatch }: -assert sslSupport -> openssl != null; - stdenv.mkDerivation rec { pname = "libevent"; version = "2.1.12"; @@ -13,6 +12,14 @@ stdenv.mkDerivation rec { sha256 = "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj"; }; + patches = [ + # Don't define BIO_get_init() for LibreSSL 3.5+ + (fetchpatch { + url = "https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9.patch"; + sha256 = "sha256-VPJqJUAovw6V92jpqIXkIR1xYGbxIWxaHr8cePWI2SU="; + }) + ]; + preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 ''; @@ -27,14 +34,10 @@ stdenv.mkDerivation rec { ++ lib.optional sslSupport "openssl" ; - nativeBuildInputs = [] - ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames - ; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - buildInputs = [] - ++ lib.optional sslSupport openssl - ++ lib.optional stdenv.isCygwin findutils - ; + buildInputs = lib.optional sslSupport openssl + ++ lib.optional stdenv.isCygwin findutils; doCheck = false; # needs the net |