1{ stdenv
2, fetchFromGitHub
3, cmake
4, boost
5, libevent
6, double-conversion
7, glog
8, lib
9, fmt_8
10, zstd
11, gflags
12, libiberty
13, openssl
14, folly
15, libsodium
16, gtest
17, zlib
18}:
19
20stdenv.mkDerivation rec {
21 pname = "fizz";
22 version = "2023.03.20.00";
23
24 src = fetchFromGitHub {
25 owner = "facebookincubator";
26 repo = "fizz";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-oBdTj7IPlmtF5rEgDVN/wwa0ZxkN6h2QMN3PQB0nCgQ=";
29 };
30
31 nativeBuildInputs = [ cmake ];
32
33 cmakeDir = "../fizz";
34
35 cmakeFlags = [ "-Wno-dev" ]
36 ++ lib.optionals stdenv.isDarwin [
37 "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
38 ];
39
40 NIX_LDFLAGS = "-lz";
41
42 buildInputs = [
43 fmt_8
44 boost
45 double-conversion
46 folly
47 glog
48 gflags
49 gtest
50 libevent
51 libiberty
52 libsodium
53 openssl
54 zlib
55 zstd
56 ];
57
58 meta = with lib; {
59 description = "C++14 implementation of the TLS-1.3 standard";
60 homepage = "https://github.com/facebookincubator/fizz";
61 changelog = "https://github.com/facebookincubator/fizz/releases/tag/v${version}";
62 license = licenses.bsd3;
63 platforms = platforms.unix;
64 maintainers = with maintainers; [ pierreis kylesferrazza ];
65 };
66}