1{ stdenv
2, lib
3, buildPythonPackage
4, fetchPypi
5, fetchpatch
6, isPy3k
7, certifi
8, cmake
9, enum34
10, openssl
11, six
12, CFNetwork
13, CoreFoundation
14, Security
15}:
16
17buildPythonPackage rec {
18 pname = "uamqp";
19 version = "1.4.0";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "sha256-XzfiLzRK1/DCmnxPW/H+KqnBuCbpYPawS2JnTQq+Vbw=";
24 };
25
26 patches = [
27 (fetchpatch {
28 url = "https://github.com/Azure/azure-c-shared-utility/commit/52ab2095649b5951e6af77f68954209473296983.patch";
29 sha256 = "06pxhdpkv94pv3lhj1vy0wlsqsdznz485bvg3zafj67r55g40lhd";
30 stripLen = "2";
31 extraPrefix = "src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/";
32 })
33 ];
34
35 buildInputs = [
36 openssl
37 certifi
38 six
39 ] ++ lib.optionals (!isPy3k) [
40 enum34
41 ] ++ lib.optionals stdenv.isDarwin [
42 CoreFoundation
43 CFNetwork
44 Security
45 ];
46
47 dontUseCmakeConfigure = true;
48
49 nativeBuildInputs = [
50 cmake
51 ];
52
53 # has no tests
54 doCheck = false;
55
56 meta = with lib; {
57 description = "An AMQP 1.0 client library for Python";
58 homepage = "https://github.com/Azure/azure-uamqp-python";
59 license = licenses.mit;
60 maintainers = with maintainers; [ maxwilson ];
61 };
62}