2021-04-05 15:23:46 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchFromGitHub
|
2021-04-05 15:23:46 +00:00
|
|
|
, pykerberos
|
2021-12-26 17:43:05 +00:00
|
|
|
, pyspnego
|
|
|
|
, pytest-mock
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2021-04-05 15:23:46 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-kerberos";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "0.14.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "requests";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
hash = "sha256-Y9dTzFCgVmSnbnTE0kEfjpEkXDEA+uOqFHLkSC27YGg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
requests
|
|
|
|
pykerberos
|
2021-12-26 17:43:05 +00:00
|
|
|
pyspnego
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
pytest-mock
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
# avoid needing to package krb5
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pyspnego[kerberos]" "pyspnego"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"requests_kerberos"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-04-05 15:23:46 +00:00
|
|
|
description = "An authentication handler for using Kerberos with Python Requests";
|
|
|
|
homepage = "https://github.com/requests/requests-kerberos";
|
|
|
|
license = licenses.isc;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ catern ];
|
|
|
|
};
|
|
|
|
}
|