summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nixops/plugins/nixops-libvirtd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/nixops/plugins/nixops-libvirtd.nix')
-rw-r--r--pkgs/applications/networking/cluster/nixops/plugins/nixops-libvirtd.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/nixops/plugins/nixops-libvirtd.nix b/pkgs/applications/networking/cluster/nixops/plugins/nixops-libvirtd.nix
new file mode 100644
index 00000000000..b3439bf4fe5
--- /dev/null
+++ b/pkgs/applications/networking/cluster/nixops/plugins/nixops-libvirtd.nix
@@ -0,0 +1,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 ];
+  };
+}