summary refs log tree commit diff
path: root/pkgs/development/python-modules/aioquic/default.nix
blob: 1b8dbb995e9fafa15e872593a2ee46426f19e8fe (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
{ lib
, fetchPypi
, fetchpatch
, buildPythonPackage
, openssl
, pylsqpack
, certifi
, pytestCheckHook
, pyopenssl
}:

buildPythonPackage rec {
  pname = "aioquic";
  version = "0.9.20";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-7ENqqs6Ze4RrAeUgDtv34+VrkYJqFE77l0j9jd0zK74=";
  };

  patches = [
    # This patch is here because it's required by the next patch.
    (fetchpatch {
      url = "https://github.com/aiortc/aioquic/commit/3930580b50831a034d21ee4689362188b21a4d6a.patch";
      hash = "sha256-XjhyajDawN/G1nPtkMbNe66iJCo76UpdA7PqwtxO5ag=";
    })
    # https://github.com/aiortc/aioquic/pull/349, fixes test failure due pyopenssl==22
    (assert lib.versions.major pyopenssl.version == "22"; fetchpatch {
      url = "https://github.com/aiortc/aioquic/commit/c3b72be85868d67ee32d49ab9bd98a4357cbcde9.patch";
      hash = "sha256-AjW+U9DpNXgA5yqKkWnx0OYpY2sZR9KIdQ3pSzxU+uY=";
    })
  ];

  propagatedBuildInputs = [
    certifi
    pylsqpack
    pyopenssl
  ];

  buildInputs = [ openssl ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "aioquic" ];

  meta = with lib; {
    description = "Implementation of QUIC and HTTP/3";
    homepage = "https://github.com/aiortc/aioquic";
    license = licenses.bsd3;
    maintainers = with maintainers; [ onny ];
  };
}