2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2019-01-27 10:56:45 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-12 16:58:15 +00:00
|
|
|
, cryptography
|
2021-05-19 09:50:50 +00:00
|
|
|
, requests
|
|
|
|
, pytestCheckHook
|
2019-01-27 10:56:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-http-signature";
|
2021-05-19 09:50:50 +00:00
|
|
|
version = "0.2.0";
|
2019-01-27 10:56:45 +00:00
|
|
|
|
|
|
|
# .pem files for tests aren't present on PyPI
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyauth";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-05-19 09:50:50 +00:00
|
|
|
sha256 = "1jsplqrxadjsc86f0kb6dgpblgwplxrpi0ql1a714w8pbbz4z3h7";
|
2019-01-27 10:56:45 +00:00
|
|
|
};
|
|
|
|
|
2021-05-19 09:50:50 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "test/test.py" ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test require network access
|
|
|
|
"test_readme_example"
|
|
|
|
];
|
2019-01-27 10:56:45 +00:00
|
|
|
|
2021-05-19 09:50:50 +00:00
|
|
|
pythonImportsCheck = [ "requests_http_signature" ];
|
2019-01-27 10:56:45 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-27 10:56:45 +00:00
|
|
|
description = "A Requests auth module for HTTP Signature";
|
|
|
|
homepage = "https://github.com/kislyuk/requests-http-signature";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
};
|
|
|
|
}
|