2022-01-25 03:21:06 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-10-30 15:09:59 +00:00
|
|
|
, poetry-core
|
2022-01-25 03:21:06 +00:00
|
|
|
, python-jose
|
2022-10-30 15:09:59 +00:00
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-toolbelt
|
|
|
|
, urllib3
|
2022-01-25 03:21:06 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-keycloak";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "2.6.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-01-25 03:21:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "marcospereirampj";
|
|
|
|
repo = "python-keycloak";
|
2022-10-30 15:09:59 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-cuj0gJlZDkbJ2HRSMcQvO4nxpjw65CKGEpWCL5sucvg=";
|
2022-01-25 03:21:06 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2023-03-15 16:39:30 +00:00
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"' \
|
|
|
|
--replace 'requests-toolbelt = "^0.9.1"' 'requests-toolbelt = "*"'
|
2022-10-30 15:09:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
python-jose
|
2022-10-30 15:09:59 +00:00
|
|
|
urllib3
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
2022-01-25 03:21:06 +00:00
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
# Test fixtures require a running keycloak instance
|
2023-05-24 13:37:59 +00:00
|
|
|
doCheck = false;
|
2022-01-25 03:21:06 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"keycloak"
|
|
|
|
];
|
2022-01-25 03:21:06 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Provides access to the Keycloak API";
|
|
|
|
homepage = "https://github.com/marcospereirampj/python-keycloak";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-01-25 03:21:06 +00:00
|
|
|
};
|
|
|
|
}
|