1{ lib
2, fetchPypi
3, fetchpatch
4, buildPythonPackage
5, openssl
6, pylsqpack
7, certifi
8, pytestCheckHook
9, pyopenssl
10}:
11
12buildPythonPackage rec {
13 pname = "aioquic";
14 version = "0.9.20";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-7ENqqs6Ze4RrAeUgDtv34+VrkYJqFE77l0j9jd0zK74=";
19 };
20
21 patches = [
22 # This patch is here because it's required by the next patch.
23 (fetchpatch {
24 url = "https://github.com/aiortc/aioquic/commit/3930580b50831a034d21ee4689362188b21a4d6a.patch";
25 hash = "sha256-XjhyajDawN/G1nPtkMbNe66iJCo76UpdA7PqwtxO5ag=";
26 })
27 # https://github.com/aiortc/aioquic/pull/349, fixes test failure due pyopenssl==22
28 (fetchpatch {
29 url = "https://github.com/aiortc/aioquic/commit/c3b72be85868d67ee32d49ab9bd98a4357cbcde9.patch";
30 hash = "sha256-AjW+U9DpNXgA5yqKkWnx0OYpY2sZR9KIdQ3pSzxU+uY=";
31 })
32 # AssertionError: 'self-signed certificate' != 'self signed certificate'
33 (fetchpatch {
34 url = "https://github.com/aiortc/aioquic/commit/cfcd3ce12fb27f5b26deb011a82f66b5d68d521a.patch";
35 hash = "sha256-bCW817Z7jCxYySfUukNR4cibURH3qZWEQjeeyvRIqZY=";
36 })
37 ];
38
39 propagatedBuildInputs = [
40 certifi
41 pylsqpack
42 pyopenssl
43 ];
44
45 buildInputs = [ openssl ];
46
47 nativeCheckInputs = [ pytestCheckHook ];
48
49 pythonImportsCheck = [ "aioquic" ];
50
51 __darwinAllowLocalNetworking = true;
52
53 meta = with lib; {
54 description = "Implementation of QUIC and HTTP/3";
55 homepage = "https://github.com/aiortc/aioquic";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ onny ];
58 };
59}