depot/third_party/nixpkgs/pkgs/development/python-modules/uamqp/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

62 lines
1.2 KiB
Nix

{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy3k
, certifi
, cmake
, enum34
, openssl
, six
, CFNetwork
, CoreFoundation
, Security
}:
buildPythonPackage rec {
pname = "uamqp";
version = "1.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-XzfiLzRK1/DCmnxPW/H+KqnBuCbpYPawS2JnTQq+Vbw=";
};
patches = [
(fetchpatch {
url = "https://github.com/Azure/azure-c-shared-utility/commit/52ab2095649b5951e6af77f68954209473296983.patch";
sha256 = "06pxhdpkv94pv3lhj1vy0wlsqsdznz485bvg3zafj67r55g40lhd";
stripLen = "2";
extraPrefix = "src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/";
})
];
buildInputs = [
openssl
certifi
six
] ++ lib.optionals (!isPy3k) [
enum34
] ++ lib.optionals stdenv.isDarwin [
CoreFoundation
CFNetwork
Security
];
dontUseCmakeConfigure = true;
nativeBuildInputs = [
cmake
];
# has no tests
doCheck = false;
meta = with lib; {
description = "An AMQP 1.0 client library for Python";
homepage = "https://github.com/Azure/azure-uamqp-python";
license = licenses.mit;
maintainers = with maintainers; [ maxwilson ];
};
}