diff --git a/pkgs/development/python-modules/swh-web-client/default.nix b/pkgs/development/python-modules/swh-web-client/default.nix new file mode 100644 index 000000000000..79b68cc1b926 --- /dev/null +++ b/pkgs/development/python-modules/swh-web-client/default.nix @@ -0,0 +1,66 @@ +{ + lib, + buildPythonPackage, + fetchFromGitLab, + setuptools, + setuptools-scm, + click, + dateutils, + requests, + swh-auth, + swh-core, + swh-model, + pytestCheckHook, + pytest-mock, + requests-mock, + types-python-dateutil, + types-pyyaml, + types-requests, +}: + +buildPythonPackage rec { + pname = "swh-web-client"; + version = "0.9.0"; + pyproject = true; + + src = fetchFromGitLab { + domain = "gitlab.softwareheritage.org"; + group = "swh"; + owner = "devel"; + repo = "swh-web-client"; + tag = "v${version}"; + hash = "sha256-/h3TaEwo2+B89KFpIKi9LH0tlGplsv3y18pC0TKM0jA="; + }; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + click + dateutils + requests + swh-auth + swh-core + swh-model + ]; + + pythonImportsCheck = [ "swh.web.client" ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-mock + requests-mock + types-python-dateutil + types-pyyaml + types-requests + ]; + + meta = { + description = "Client for Software Heritage Web applications, via their APIs"; + homepage = "https://gitlab.softwareheritage.org/swh/devel/swh-web-client"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 82240f4248d3..0e8cfc9f9bce 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17355,6 +17355,8 @@ self: super: with self; { swh-model = callPackage ../development/python-modules/swh-model { }; + swh-web-client = callPackage ../development/python-modules/swh-web-client { }; + swift = callPackage ../development/python-modules/swift { }; swifter = callPackage ../development/python-modules/swifter { };