1{
2 aiohttp,
3 aioresponses,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatchling,
7 lib,
8 pytest-asyncio,
9 pytest-cov-stub,
10 pytestCheckHook,
11 yarl,
12}:
13
14buildPythonPackage rec {
15 pname = "pypaperless";
16 version = "5.0.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "tb1337";
21 repo = "paperless-api";
22 tag = "v${version}";
23 hash = "sha256-ItaHtAhLrrrLrem6gW5oRUqYIJAdhBJH+aig2cWN1a4=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace-fail 'version = "0.0.0"' 'version = "${version}"'
29 '';
30
31 build-system = [ hatchling ];
32
33 pythonRelaxDeps = [
34 "aiohttp"
35 "yarl"
36 ];
37
38 dependencies = [
39 aiohttp
40 yarl
41 ];
42
43 pythonImportsCheck = [ "pypaperless" ];
44
45 nativeCheckInputs = [
46 aioresponses
47 pytest-asyncio
48 pytest-cov-stub
49 pytestCheckHook
50 ];
51
52 meta = {
53 changelog = "https://github.com/tb1337/paperless-api/releases/tag/${src.tag}";
54 description = "Little api client for paperless(-ngx)";
55 homepage = "https://github.com/tb1337/paperless-api";
56 license = lib.licenses.mit;
57 maintainers = with lib.maintainers; [ dotlambda ];
58 };
59}