summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pydo/default.nix
blob: 18dad347f5c4c07e9571e9718ebd3c5630c54d36 (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
52
53
54
55
56
57
58
59
60
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  azure-core,
  azure-identity,
  isodate,
  msrest,
  aioresponses,
  pytest-asyncio,
  pytestCheckHook,
  responses,
}:

buildPythonPackage rec {
  pname = "pydo";
  version = "0.24.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "digitalocean";
    repo = "pydo";
    tag = "v${version}";
    hash = "sha256-IfoW8JaLqghecADPKfVwjW99ZosHFXFt3iQ8WOyrCns=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    azure-core
    azure-identity
    isodate
    msrest
  ];

  pythonImportsCheck = [ "pydo" ];

  nativeCheckInputs = [
    aioresponses
    pytest-asyncio
    pytestCheckHook
    responses
  ];

  # integration tests require hitting the live api with a
  # digital ocean token
  disabledTestPaths = [
    "tests/integration/"
  ];

  meta = {
    description = "Official DigitalOcean Client based on the DO OpenAPIv3 specification";
    homepage = "https://github.com/digitalocean/pydo";
    changelog = "https://github.com/digitalocean/pydo/releases/tag/v${version}";
    license = lib.licenses.asl20;
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ ethancedwards8 ];
  };
}