Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
libressl: build with cmake
Browse files Browse the repository at this point in the history
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]: buildroot/buildroot@e783d60
  • Loading branch information
ruuda committed May 4, 2019
1 parent 3415872 commit 8c7cde5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pkgs/development/libraries/libressl/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, lib }:
{ stdenv, fetchurl, lib, cmake }:

let

Expand All @@ -11,14 +11,26 @@ 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;

outputs = [ "bin" "dev" "out" "man" "nc" ];

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"
'';

Expand Down

0 comments on commit 8c7cde5

Please sign in to comment.