about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nixops/plugins/nixops-hetznercloud.nix
blob: 17e94ab9f32bd384b08fd1988ddbd5c1fbf657fb (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, hcloud
, nixops
, typing-extensions
}:

buildPythonPackage {
  pname = "nixops-hetznercloud";
  version = "unstable-2023-02-19";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "lukebfox";
    repo = "nixops-hetznercloud";
    rev = "e14f340f7ffe9e2aa7ffbaac0b8a2e3b4cc116b3";
    hash = "sha256-IsRJUUAfN6YXcue80qlcunkawUtgMiMU8mM6DP+7Cm4=";
  };

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

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    nixops
  ];

  propagatedBuildInputs = [
    hcloud
    typing-extensions
  ];

  pythonImportsCheck = [ "nixops_hetznercloud" ];

  passthru.updateScript = unstableGitUpdater {};

  meta = with lib; {
    description = "A NixOps plugin supporting Hetzner Cloud deployments";
    homepage = "https://github.com/lukebfox/nixops-hetznercloud";
    license = licenses.lgpl3Only;
    maintainers = with maintainers; [ lukebfox ];
  };
}