depot/third_party/nixpkgs/pkgs/development/python-modules/python-keycloak/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

55 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, python-jose
, pythonOlder
, requests
, requests-toolbelt
, urllib3
}:
buildPythonPackage rec {
pname = "python-keycloak";
version = "2.6.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "marcospereirampj";
repo = "python-keycloak";
rev = "v${version}";
hash = "sha256-cuj0gJlZDkbJ2HRSMcQvO4nxpjw65CKGEpWCL5sucvg=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"'
'';
buildInputs = [
poetry-core
];
propagatedBuildInputs = [
python-jose
urllib3
requests
requests-toolbelt
];
# Test fixtures require a running keycloak instance
doTest = false;
pythonImportsCheck = [
"keycloak"
];
meta = with lib; {
description = "Provides access to the Keycloak API";
homepage = "https://github.com/marcospereirampj/python-keycloak";
license = licenses.mit;
maintainers = with maintainers; [ costrouc ];
};
}