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

buildPythonPackage {
  pname = "nixops-libvirtd";
  version = "unstable-2023-09-01";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nix-community";
    repo = "nixops-libvirtd";
    rev = "b59424bf53e74200d684a4bce1ae64d276e793a0";
    hash = "sha256-HxJu8/hOPI5aCddTpna0mf+emESYN3ZxpTkitfKcfVQ=";
  };

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

  nativeBuildInputs = [
    poetry-core
  ];

  buildInputs = [
    nixops
  ];

  propagatedBuildInputs = [
    libvirt
  ];

  pythonImportsCheck = [ "nixops_virtd" ];

  passthru.updateScript = unstableGitUpdater {};

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