1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 python,
7}:
8let
9 version = "3.4.0";
10
11 inherit (python) pythonVersion;
12
13 Srcs =
14 let
15 getSrcFromPypi =
16 {
17 platform,
18 dist,
19 hash,
20 }:
21 fetchPypi {
22 inherit
23 version
24 platform
25 dist
26 hash
27 ;
28 pname = "pulsar_client";
29 format = "wheel";
30 python = dist;
31 abi = dist;
32 };
33 in
34 {
35 "3.9-x86_64-linux" = getSrcFromPypi {
36 platform = "manylinux_2_17_x86_64.manylinux2014_x86_64";
37 dist = "cp39";
38 hash = "sha256-1P5ArMoLZiUkHUoQ/mJccbNj5/7el/op+Qo6cGQ33xE=";
39 };
40 "3.9-aarch64-linux" = getSrcFromPypi {
41 platform = "manylinux_2_17_aarch64.manylinux2014_aarch64";
42 dist = "cp39";
43 hash = "sha256-11JQZRwMLtt7sK/JlCBqqRyfTVIAVJFN2sL+nAkQgvU=";
44 };
45 "3.9-aarch64-darwin" = getSrcFromPypi {
46 platform = "macosx_10_15_universal2";
47 dist = "cp39";
48 hash = "sha256-dwTGZKosgBr0wtOljp2P+u7xLOig9xcS6Rh/mpbahW8=";
49 };
50 "3.9-x86_64-darwin" = getSrcFromPypi {
51 platform = "macosx_10_15_universal2";
52 dist = "cp39";
53 hash = "sha256-dwTGZKosgBr0wtOljp2P+u7xLOig9xcS6Rh/mpbahW8=";
54 };
55 "3.10-x86_64-linux" = getSrcFromPypi {
56 platform = "manylinux_2_17_x86_64.manylinux2014_x86_64";
57 dist = "cp310";
58 hash = "sha256-swp1kuQsdgNOmo1k1C3VurNhQl+GneVi6cytaY4ZzYg=";
59 };
60 "3.10-aarch64-linux" = getSrcFromPypi {
61 platform = "musllinux_1_1_aarch64";
62 dist = "cp310";
63 hash = "sha256-1ZYwkKeKVkS6JfQdo6bUnqPwDJcrCVuv82WRbcJGQmo=";
64 };
65 "3.10-aarch64-darwin" = getSrcFromPypi {
66 platform = "macosx_10_15_universal2";
67 dist = "cp310";
68 hash = "sha256-6/mdtSRP9pR5KDslYhsHBJKsxLtkPRYthrkDh8tv2yo=";
69 };
70 "3.10-x86_64-darwin" = getSrcFromPypi {
71 platform = "macosx_10_15_universal2";
72 dist = "cp310";
73 hash = "sha256-6/mdtSRP9pR5KDslYhsHBJKsxLtkPRYthrkDh8tv2yo=";
74 };
75 "3.11-x86_64-linux" = getSrcFromPypi {
76 platform = "manylinux_2_17_x86_64.manylinux2014_x86_64";
77 dist = "cp311";
78 hash = "sha256-M1cd6ZzYmDSfF5eLpi4rg56gJ1+3Bn8xv19uv+rgmH0=";
79 };
80 "3.11-aarch64-linux" = getSrcFromPypi {
81 platform = "manylinux_2_17_aarch64.manylinux2014_aarch64";
82 dist = "cp311";
83 hash = "sha256-+HQ8MgqpZ5jSDK+pjql6aMQpX8SHLCOs1eAS/TbLBro=";
84 };
85 "3.11-aarch64-darwin" = getSrcFromPypi {
86 platform = "macosx_10_15_universal2";
87 dist = "cp311";
88 hash = "sha256-EZUvsCLuct6/U7Fp9EgvncXIkL4BSa6Yd5hks6IfG9M=";
89 };
90 "3.11-x86_64-darwin" = getSrcFromPypi {
91 platform = "macosx_10_15_universal2";
92 dist = "cp311";
93 hash = "sha256-EZUvsCLuct6/U7Fp9EgvncXIkL4BSa6Yd5hks6IfG9M=";
94 };
95 "3.12-x86_64-linux" = getSrcFromPypi {
96 platform = "manylinux_2_17_x86_64.manylinux2014_x86_64";
97 dist = "cp312";
98 hash = "sha256-xgbATzVzQQQvpsdUd959IgT3rlCqKcL3SyTlTIX0f5Y=";
99 };
100 "3.12-aarch64-linux" = getSrcFromPypi {
101 platform = "manylinux_2_17_aarch64.manylinux2014_aarch64";
102 dist = "cp312";
103 hash = "sha256-8gK4Th9oPWRnLdGXERRgCuLlw3NVhyhv+b+0MThfCOg=";
104 };
105 "3.12-aarch64-darwin" = getSrcFromPypi {
106 platform = "macosx_10_15_universal2";
107 dist = "cp312";
108 hash = "sha256-Hgd6SDm+Pq094/BbTCRCadyi3wf0fOoLkFRMfp3BZC8=";
109 };
110 "3.12-x86_64-darwin" = getSrcFromPypi {
111 platform = "macosx_10_15_universal2";
112 dist = "cp312";
113 hash = "sha256-Hgd6SDm+Pq094/BbTCRCadyi3wf0fOoLkFRMfp3BZC8=";
114 };
115 };
116in
117buildPythonPackage {
118 pname = "pulsar-client";
119 inherit version;
120
121 format = "wheel";
122
123 src =
124 Srcs."${pythonVersion}-${stdenv.hostPlatform.system}"
125 or (throw "Unsupported '${pythonVersion}-${stdenv.hostPlatform.system}' target");
126
127 meta = with lib; {
128 description = "Client for pulsar";
129 homepage = "https://pypi.org/project/pulsar-client/";
130 license = licenses.asl20;
131 maintainers = with maintainers; [ fab ];
132 };
133}