depot/third_party/nixpkgs/pkgs/development/python-modules/python-keycloak/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

54 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
deprecation,
fetchFromGitHub,
jwcrypto,
poetry-core,
pythonOlder,
requests,
requests-toolbelt,
}:
buildPythonPackage rec {
pname = "python-keycloak";
version = "4.0.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "marcospereirampj";
repo = "python-keycloak";
rev = "refs/tags/v${version}";
hash = "sha256-ZXS29bND4GsJNhTGiUsLo+4FYd8Tubvg/+PJ33tqovY=";
};
postPatch = ''
# Upstream doesn't set version
substituteInPlace pyproject.toml \
--replace-fail 'version = "0.0.0"' 'version = "${version}"'
'';
build-system = [ poetry-core ];
dependencies = [
deprecation
jwcrypto
requests
requests-toolbelt
];
# Test fixtures require a running keycloak instance
doCheck = false;
pythonImportsCheck = [ "keycloak" ];
meta = with lib; {
description = "Provides access to the Keycloak API";
homepage = "https://github.com/marcospereirampj/python-keycloak";
changelog = "https://github.com/marcospereirampj/python-keycloak/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = [ ];
};
}