about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRuud van Asseldonk <dev@veniogames.com>2019-05-04 15:55:14 +0200
committerRuud van Asseldonk <dev@veniogames.com>2019-05-04 15:55:14 +0200
commit8c7cde5df2dc16599397f0511432c9d52317217a (patch)
treebe0fbd13832411d621237d8678baab8224b0b4aa /pkgs
parent3415872fe4e0d1ba082b7a90829b2e54ff6c6f7c (diff)
downloadnixlib-8c7cde5df2dc16599397f0511432c9d52317217a.tar
nixlib-8c7cde5df2dc16599397f0511432c9d52317217a.tar.gz
nixlib-8c7cde5df2dc16599397f0511432c9d52317217a.tar.bz2
nixlib-8c7cde5df2dc16599397f0511432c9d52317217a.tar.lz
nixlib-8c7cde5df2dc16599397f0511432c9d52317217a.tar.xz
nixlib-8c7cde5df2dc16599397f0511432c9d52317217a.tar.zst
nixlib-8c7cde5df2dc16599397f0511432c9d52317217a.zip
libressl: build with cmake
LibreSSL 2.9.1 no longer builds with the default autotools configuration.
When I searched for the error, I noticed that Buildroot ran into the
same issue, and they resolved the problem by building with CMake rather
than autotools. [1] I followed the same approach here.

[1]: https://github.com/buildroot/buildroot/commit/e783d60473944f8b39f1def45d8d6b483a062158
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/libressl/default.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix
index 701d151eb9a3..62fed24200ee 100644
--- a/pkgs/development/libraries/libressl/default.nix
+++ b/pkgs/development/libraries/libressl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, lib }:
+{ stdenv, fetchurl, lib, cmake }:
 
 let
 
@@ -11,7 +11,17 @@ let
       inherit sha256;
     };
 
-    configureFlags = [ "--enable-nc" ];
+    nativeBuildInputs = [ cmake ];
+
+    cmakeFlags = [ "-DENABLE_NC=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'.
+    # Fortunately LibreSSL provides a CMake build as well, so opt for CMake by
+    # removing ./configure pre-config.
+    preConfigure = ''
+      rm configure
+    '';
 
     enableParallelBuilding = true;
 
@@ -19,6 +29,8 @@ let
 
     postFixup = ''
       moveToOutput "bin/nc" "$nc"
+      moveToOutput "bin/openssl" "$bin"
+      moveToOutput "bin/ocspcheck" "$bin"
       moveToOutput "share/man/man1/nc.1${lib.optionalString (dontGzipMan==null) ".gz"}" "$nc"
     '';