about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nixops/plugins/nixops-digitalocean.nix
blob: 094f493dbb7205f08b9161f518bc2467a3b50987 (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
52
53
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, nixops
, python-digitalocean
, pythonOlder
}:

buildPythonPackage {
  pname = "nixops-digitalocean";
  version = "0.1.0-unstable-2022-08-14";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "nix-community";
    repo = "nixops-digitalocean";
    rev = "e977b7f11e264a6a2bff2dcbc7b94c6a97b92fff";
    hash = "sha256-aJtShvdqjAiCK5oZL0GR5cleDb4s1pJkO6UPKGd4Dgg=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
    --replace poetry.masonry.api poetry.core.masonry.api \
    --replace "poetry>=" "poetry-core>="
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    nixops
  ];

  propagatedBuildInputs = [
    python-digitalocean
  ];

  pythonImportsCheck = [ "nixops_digitalocean" ];

  passthru.updateScript = unstableGitUpdater {};

  meta = with lib; {
    description = "NixOps Digitalocean plugin";
    homepage = "https://github.com/nix-community/nixops-digitalocean";
    license = licenses.lgpl3Only;
    maintainers = with maintainers; [ kiwi ];
  };
}