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