1{ stdenv, fetchFromGitHub, autoreconfHook }:
2
3stdenv.mkDerivation rec {
4 name = "wolfssl-${version}";
5 version = "3.15.7";
6
7 src = fetchFromGitHub {
8 owner = "wolfSSL";
9 repo = "wolfssl";
10 rev = "v${version}-stable";
11 sha256 = "128z1f7nry278kdjzq950cr81bml8p17fgdchmpvy0awhh7r20y9";
12 };
13
14 configureFlags = [ "--enable-all" ];
15
16 outputs = [ "out" "dev" "doc" "lib" ];
17
18 nativeBuildInputs = [ autoreconfHook ];
19
20 postInstall = ''
21 # fix recursive cycle:
22 # wolfssl-config points to dev, dev propagates bin
23 moveToOutput bin/wolfssl-config "$dev"
24 # moveToOutput also removes "$out" so recreate it
25 mkdir -p "$out"
26 '';
27
28 meta = with stdenv.lib; {
29 description = "A small, fast, portable implementation of TLS/SSL for embedded devices";
30 homepage = "https://www.wolfssl.com/";
31 platforms = platforms.all;
32 license = stdenv.lib.licenses.gpl2;
33 maintainers = with maintainers; [ mcmtroffaes ];
34 };
35}