2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-05-20 23:08:51 +00:00
|
|
|
, cryptography
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-http-signature";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "0.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# .pem files for tests aren't present on PyPI
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyauth";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "1jsplqrxadjsc86f0kb6dgpblgwplxrpi0ql1a714w8pbbz4z3h7";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
requests
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "test/test.py" ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test require network access
|
|
|
|
"test_readme_example"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "requests_http_signature" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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 ];
|
|
|
|
};
|
|
|
|
}
|