diff --git a/pkgs/development/python-modules/pypaperless/default.nix b/pkgs/development/python-modules/pypaperless/default.nix new file mode 100644 index 000000000000..d5fd9ffcde1c --- /dev/null +++ b/pkgs/development/python-modules/pypaperless/default.nix @@ -0,0 +1,54 @@ +{ + aiohttp, + aioresponses, + buildPythonPackage, + fetchFromGitHub, + hatchling, + lib, + pytest-asyncio, + pytest-cov-stub, + pytestCheckHook, + yarl, +}: + +buildPythonPackage rec { + pname = "pypaperless"; + version = "4.1.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tb1337"; + repo = "paperless-api"; + tag = "v${version}"; + hash = "sha256-uzMYHlV+xqWIpqPpX2myxS9cqBsqShOoQ9oedDT/zeA="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'version = "0.0.0"' 'version = "${version}"' + ''; + + build-system = [ hatchling ]; + + dependencies = [ + aiohttp + yarl + ]; + + pythonImportsCheck = [ "pypaperless" ]; + + nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytest-cov-stub + pytestCheckHook + ]; + + meta = { + changelog = "https://github.com/tb1337/paperless-api/releases/tag/${src.tag}"; + description = "Little api client for paperless(-ngx)"; + homepage = "https://github.com/tb1337/paperless-api"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9bb52dc08633..c48a5dd5688c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13153,6 +13153,8 @@ self: super: with self; { pypandoc = callPackage ../development/python-modules/pypandoc { }; + pypaperless = callPackage ../development/python-modules/pypaperless { }; + pyparser = callPackage ../development/python-modules/pyparser { }; pyparsing = callPackage ../development/python-modules/pyparsing { };