summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyimgbox/default.nix
blob: 225ed464998d8d9fdbc0e3fd26b0acc72c2c056a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
  lib,
  buildPythonPackage,
  fetchFromGitea,
  beautifulsoup4,
  httpx,
  pytest-asyncio,
  pytest-httpserver,
  pytest-mock,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage (finalAttrs: {
  pname = "pyimgbox";
  version = "1.0.7";
  pyproject = true;

  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = "plotski";
    repo = "pyimgbox";
    tag = "v${finalAttrs.version}";
    hash = "sha256-HYKi5nYXJ+5ytQEFVMMm1HxEsD1zMU7cE2mOdwuZxvk=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    httpx
    beautifulsoup4
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytest-httpserver
    pytest-mock
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pyimgbox" ];

  meta = {
    description = "API for uploading images to imgbox.com";
    homepage = "https://codeberg.org/plotski/pyimgbox";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ambroisie ];
  };
})