nixops_unstable*: Make withPlugins.*.tests.nixos behave correctly
This commit is contained in:
parent
4a29e5442d
commit
663b3d4be7
@ -9,7 +9,7 @@ let
|
||||
# - Alternatively, blocked on a NixOps 2 release
|
||||
# https://github.com/NixOS/nixops/issues/1242
|
||||
# stable = testsLegacyNetwork { nixopsPkg = pkgs.nixops; };
|
||||
unstable = testsForPackage { nixopsPkg = pkgs.nixops_unstable; };
|
||||
unstable = testsForPackage { nixopsPkg = pkgs.nixops_unstable_minimal; };
|
||||
|
||||
# inherit testsForPackage;
|
||||
};
|
||||
|
@ -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: []);
|
||||
|
@ -50,7 +50,7 @@ buildPythonApplication rec {
|
||||
pythonImportsCheck = [ "nixops" ];
|
||||
|
||||
passthru = {
|
||||
tests.nixops = nixosTests.nixops.unstable;
|
||||
tests.nixos = nixosTests.nixops.unstable;
|
||||
updateScript = unstableGitUpdater {};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user