summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nixops/plugins/nixops-vbox.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/nixops/plugins/nixops-vbox.nix')
-rw-r--r--pkgs/applications/networking/cluster/nixops/plugins/nixops-vbox.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/applications/networking/cluster/nixops/plugins/nixops-vbox.nix b/pkgs/applications/networking/cluster/nixops/plugins/nixops-vbox.nix
new file mode 100644
index 00000000000..4a9f0351094
--- /dev/null
+++ b/pkgs/applications/networking/cluster/nixops/plugins/nixops-vbox.nix
@@ -0,0 +1,45 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, unstableGitUpdater
+, poetry-core
+, nixops
+}:
+
+buildPythonPackage {
+  pname = "nixops-vbox";
+  version = "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 {};
+
+  meta = with lib; {
+    description = "NixOps plugin for VirtualBox VMs";
+    homepage = "https://github.com/nix-community/nixops-vbox";
+    license = licenses.lgpl3Only;
+    maintainers = with maintainers; [ aminechikhaoui ];
+  };
+}