about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nixops/plugins/nixops-gce.nix
blob: 604e82114badcc932502c5a39e2a28ad8b69733f (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
54
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, cryptography
, libcloud
, nixops
, nixos-modules-contrib
}:

buildPythonPackage {
  pname = "nixops-gce";
  version = "unstable-2023-05-26";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nix-community";
    repo = "nixops-gce";
    rev = "d13cb794aef763338f544010ceb1816fe31d7f42";
    hash = "sha256-UkYf6CoUrr8yuQoe/ik6vu+UCi3ByJd0BdkS9SLEp0Q=";
  };

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

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    nixops
  ];

  propagatedBuildInputs = [
    cryptography
    libcloud
    nixos-modules-contrib
  ];

  pythonImportsCheck = [ "nixops_gcp" ];

  passthru.updateScript = unstableGitUpdater {};

  meta = with lib; {
    description = "NixOps Google Cloud Backend";
    homepage = "https://github.com/nix-community/nixops-gce";
    license = licenses.mit;
    maintainers = nixops.meta.maintainers;
  };
}