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

buildPythonPackage {
  pname = "nixops-vbox";
  version = "1.0.0-unstable-2023-08-10";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nix-community";
    repo = "nixops-vbox";
    rev = "baa5f09c9ae9aaf639c95192460ab5dcbe83a883";
    hash = "sha256-QrxherQO1t0VpYjJSEbntUWVD6GW4MtVHiKINpzHA1M=";
  };

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

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    nixops
  ];

  pythonImportsCheck = [ "nixopsvbox" ];

  passthru.updateScript = unstableGitUpdater {
    tagPrefix = "v";
  };

  meta = with lib; {
    description = "NixOps plugin for VirtualBox VMs";
    homepage = "https://github.com/nix-community/nixops-vbox";
    license = licenses.lgpl3Only;
    maintainers = with maintainers; [ aminechikhaoui ];
  };
}