summary refs log tree commit diff
path: root/pkgs/development/libraries/libressl
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-09-19 12:35:55 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2019-09-19 12:38:08 -0400
commit8f01848075d4017aecdd793f47b979310b934088 (patch)
tree172dfe22c6acbfedf76b26595b03db69a6445a0b /pkgs/development/libraries/libressl
parent2c32f91bfc3d50175dd1f1eb87bf34626b7e8ab5 (diff)
downloadnixpkgs-8f01848075d4017aecdd793f47b979310b934088.tar
nixpkgs-8f01848075d4017aecdd793f47b979310b934088.tar.gz
nixpkgs-8f01848075d4017aecdd793f47b979310b934088.tar.bz2
nixpkgs-8f01848075d4017aecdd793f47b979310b934088.tar.lz
nixpkgs-8f01848075d4017aecdd793f47b979310b934088.tar.xz
nixpkgs-8f01848075d4017aecdd793f47b979310b934088.tar.zst
nixpkgs-8f01848075d4017aecdd793f47b979310b934088.zip
libressl: support musl in libressl 2.9.2
Diffstat (limited to 'pkgs/development/libraries/libressl')
-rw-r--r--pkgs/development/libraries/libressl/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix
index 4bfa6cd0b8e..41f24a36eac 100644
--- a/pkgs/development/libraries/libressl/default.nix
+++ b/pkgs/development/libraries/libressl/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl, lib, cmake, cacert }:
+{ stdenv, fetchurl, lib, cmake, cacert, fetchpatch }:
 
 let
 
-  generic = { version, sha256 }: stdenv.mkDerivation rec {
+  generic = { version, sha256, patches ? [] }: stdenv.mkDerivation rec {
     pname = "libressl";
     inherit version;
 
@@ -31,6 +31,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") ''
@@ -69,6 +71,12 @@ in {
   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 {