diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:37:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:41:30 +0000 |
commit | 6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch) | |
tree | 035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/development/libraries/libressl/default.nix | |
parent | da7500bc026e937ac7fce7b50f67a0e1765737a7 (diff) | |
parent | e4134747f5666bcab8680aff67fa3b63384f9a0f (diff) | |
download | nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2 nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip |
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libressl/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libressl/default.nix | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libressl/default.nix b/nixpkgs/pkgs/development/libraries/libressl/default.nix index 4bfa6cd0b8e4..285d7b607e7b 100644 --- a/nixpkgs/pkgs/development/libraries/libressl/default.nix +++ b/nixpkgs/pkgs/development/libraries/libressl/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, lib, cmake, cacert }: +{ stdenv, fetchurl, lib, cmake, cacert, fetchpatch, buildShared ? true }: let - generic = { version, sha256 }: stdenv.mkDerivation rec { + generic = { version, sha256, patches ? [] }: stdenv.mkDerivation rec { pname = "libressl"; inherit version; @@ -15,13 +15,14 @@ let cmakeFlags = [ "-DENABLE_NC=ON" - "-DBUILD_SHARED_LIBS=ON" # Ensure that the output libraries do not require an executable stack. # Without this define, assembly files in libcrypto do not include a # .note.GNU-stack section, and if that section is missing from any object, # the linker will make the stack executable. "-DCMAKE_C_FLAGS=-DHAVE_GNU_STACK" - ]; + # libressl will append this to the regular prefix for libdir + "-DCMAKE_INSTALL_LIBDIR=lib" + ] ++ lib.optional buildShared "-DBUILD_SHARED_LIBS=ON"; # The autoconf build is broken as of 2.9.1, resulting in the following error: # libressl-2.9.1/tls/.libs/libtls.a', needed by 'handshake_table'. @@ -31,6 +32,8 @@ let rm configure ''; + inherit patches; + # Since 2.9.x the default location can't be configured from the build using # DEFAULT_CA_FILE anymore, instead we have to patch the default value. postPatch = lib.optionalString (lib.versionAtLeast version "2.9.2") '' @@ -61,18 +64,19 @@ let in { - libressl_2_8 = generic { - version = "2.8.3"; - sha256 = "0xw4z4z6m7lyf1r4m2w2w1k7as791c04ygnfk4d7d0ki0h9hnr4v"; - }; - libressl_2_9 = generic { version = "2.9.2"; sha256 = "1m6mz515dcbrbnyz8hrpdfjzdmj1c15vbgnqxdxb89g3z9kq3iy4"; + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl [ + (fetchpatch { + url = "https://github.com/libressl-portable/portable/pull/529/commits/a747aacc23607c993cc481378782b2c7dd5bc53b.patch"; + sha256 = "0wbrcscdkjpk4mhh7f3saghi4smia4lhf7fl6la3ahhgx1krn5zm"; + }) + ]; }; libressl_3_0 = generic { - version = "3.0.0"; - sha256 = "0xiwri6xcnl3wb5nbc4aw8pv32s3hp13r9v465yr8wykaw211n81"; + version = "3.0.2"; + sha256 = "13ir2lpxz8y1m151k7lrx306498nzfhwlvgkgv97v5cvywmifyyz"; }; } |