about summary refs log tree commit diff
path: root/pkgs/development/libraries/ngtcp2/gnutls.nix
blob: 31f69e82198fe95bf871f41d7d4d346214b64197 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib, stdenv, fetchFromGitHub
, autoreconfHook, pkg-config
, gnutls
, cunit, ncurses, knot-dns
}:

stdenv.mkDerivation rec {
  pname = "ngtcp2";
  version = "1.7.0";

  src = fetchFromGitHub {
    owner = "ngtcp2";
    repo = "ngtcp2";
    rev = "v${version}";
    hash = "sha256-7DesCT8swwk9E1ckYrj3mGsdx37HrJxd+svKpJRrhoI=";
  };

  outputs = [ "out" "dev" ];

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ gnutls ];

  configureFlags = [ "--with-gnutls=yes" ];
  enableParallelBuilding = true;

  doCheck = true;
  nativeCheckInputs = [ cunit ]
    ++ lib.optional stdenv.hostPlatform.isDarwin ncurses;

  passthru.tests = knot-dns.passthru.tests; # the only consumer so far

  meta = with lib; {
    homepage = "https://github.com/ngtcp2/ngtcp2";
    description = "Effort to implement RFC9000 QUIC protocol";
    license = licenses.mit;
    platforms = platforms.unix;
    maintainers = with maintainers; [ vcunat/* for knot-dns */ ];
  };
}

/*
  Why split from ./default.nix?

  ngtcp2 libs contain helpers to plug into various crypto libs (gnutls, patched openssl, ...).
  Building multiple of them while keeping closures separable would be relatively complicated.
  Separating the builds is easier for now; the missed opportunity to share the 0.3--0.4 MB
  library isn't such a big deal.

  Moreover upstream still commonly does incompatible changes, so agreeing
  on a single version might be hard sometimes.  That's why it seemed simpler
  to completely separate the nix expressions, too.
*/