about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nixops
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2024-02-28 16:22:34 +0100
committerRobert Hensing <robert@roberthensing.nl>2024-03-06 22:47:22 +0100
commit663b3d4be79ebb31ab277a55c0fe4b975cfa17c2 (patch)
treed113832c36f4de5e8c16688814357028e9d99918 /pkgs/applications/networking/cluster/nixops
parent4a29e5442d66d939abf6216894bedfdb79ae3a15 (diff)
nixops_unstable*: Make withPlugins.*.tests.nixos behave correctly
Diffstat (limited to 'pkgs/applications/networking/cluster/nixops')
-rw-r--r--pkgs/applications/networking/cluster/nixops/default.nix10
-rw-r--r--pkgs/applications/networking/cluster/nixops/unwrapped.nix2
2 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/applications/networking/cluster/nixops/default.nix b/pkgs/applications/networking/cluster/nixops/default.nix
index da9783b9a6eb1..6bdbebb8eb6d1 100644
--- a/pkgs/applications/networking/cluster/nixops/default.nix
+++ b/pkgs/applications/networking/cluster/nixops/default.nix
@@ -28,8 +28,8 @@ let
   # selector is a function mapping pythonPackages to a list of plugins
   # e.g. nixops_unstable.withPlugins (ps: with ps; [ nixops-aws ])
   withPlugins = selector: let
-    selected = selector (plugins python.pkgs);
-  in python.pkgs.toPythonApplication (python.pkgs.nixops.overridePythonAttrs (old: {
+   selected = selector (plugins python.pkgs);
+   r = python.pkgs.toPythonApplication (python.pkgs.nixops.overridePythonAttrs (old: {
     propagatedBuildInputs = old.propagatedBuildInputs ++ selected;
 
     # Propagating dependencies leaks them through $PYTHONPATH which causes issues
@@ -41,8 +41,14 @@ let
     passthru = old.passthru // {
       plugins = plugins python.pkgs;
       inherit withPlugins python;
+      tests = old.passthru.tests // {
+        nixos = old.passthru.tests.nixos.passthru.override {
+          nixopsPkg = r;
+        };
+      };
     };
   }));
+  in r;
 
 in {
   nixops_unstable_minimal = withPlugins (ps: []);
diff --git a/pkgs/applications/networking/cluster/nixops/unwrapped.nix b/pkgs/applications/networking/cluster/nixops/unwrapped.nix
index 34cbf09491546..058f7f2d2c1c9 100644
--- a/pkgs/applications/networking/cluster/nixops/unwrapped.nix
+++ b/pkgs/applications/networking/cluster/nixops/unwrapped.nix
@@ -50,7 +50,7 @@ buildPythonApplication rec {
   pythonImportsCheck = [ "nixops" ];
 
   passthru = {
-    tests.nixops = nixosTests.nixops.unstable;
+    tests.nixos = nixosTests.nixops.unstable;
     updateScript = unstableGitUpdater {};
   };