summary refs log tree commit diff
path: root/pkgs/development/python-modules/digitalocean/default.nix
blob: 09ff7c52bdded0865fe91d03bd05c98d678e7172 (plain) (blame)
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
, fetchFromGitHub
, isPy3k
, jsonpickle
, mock
, pytest
, pytestCheckHook
, requests
, responses
}:

buildPythonPackage rec {
  pname = "python-digitalocean";
  version = "1.17.0";

  src = fetchFromGitHub {
    owner = "koalalorenzo";
    repo = pname;
    rev = "v${version}";
    sha256 = "1c50ka4y712rr551gq3kdfw7fgfxr4w837sww6yy683yz7m1d1h8";
  };

  propagatedBuildInputs = [
    jsonpickle
    requests
  ];

  dontUseSetuptoolsCheck = true;

  nativeCheckInputs = [
    pytest
    pytestCheckHook
    responses
  ] ++ lib.optionals (!isPy3k) [
    mock
  ];

  preCheck = ''
    cd digitalocean
  '';

  pythonImportsCheck = [ "digitalocean" ];

  meta = with lib; {
    description = "Python API to manage Digital Ocean Droplets and Images";
    homepage = "https://github.com/koalalorenzo/python-digitalocean";
    license = with licenses; [ lgpl3Only ];
    maintainers = with maintainers; [ kiwi teh ];
  };
}