diff options
author | Robert Hensing <robert@roberthensing.nl> | 2024-02-28 17:23:21 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2024-03-06 22:47:23 +0100 |
commit | 27b08a25ccef11709250163a5121ea3607115b2c (patch) | |
tree | b8e806c94cc73860cf57bb41335cd3932065aa63 /pkgs/applications/networking/cluster/nixops/default.nix | |
parent | 60618cc6973102eea2b983bc7eb2a31e655095b4 (diff) |
pkgs/applications/networking/cluster/nixops/default.nix: Format
Diffstat (limited to 'pkgs/applications/networking/cluster/nixops/default.nix')
-rw-r--r-- | pkgs/applications/networking/cluster/nixops/default.nix | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/pkgs/applications/networking/cluster/nixops/default.nix b/pkgs/applications/networking/cluster/nixops/default.nix index e6a8a69cc4c7b..ea0f2af2b4fcc 100644 --- a/pkgs/applications/networking/cluster/nixops/default.nix +++ b/pkgs/applications/networking/cluster/nixops/default.nix @@ -29,37 +29,40 @@ let # selector is a function mapping pythonPackages to a list of plugins # e.g. nixops_unstable.withPlugins (ps: with ps; [ nixops-aws ]) - withPlugins' = { availablePlugins }: selector: let - selectedPlugins = selector availablePlugins; - r = python.pkgs.toPythonApplication (python.pkgs.nixops.overridePythonAttrs (old: { - propagatedBuildInputs = old.propagatedBuildInputs ++ selectedPlugins; + withPlugins' = { availablePlugins }: selector: + let + selectedPlugins = selector availablePlugins; + r = python.pkgs.toPythonApplication (python.pkgs.nixops.overridePythonAttrs (old: { + propagatedBuildInputs = old.propagatedBuildInputs ++ selectedPlugins; - # Propagating dependencies leaks them through $PYTHONPATH which causes issues - # when used in nix-shell. - postFixup = '' - rm $out/nix-support/propagated-build-inputs - ''; + # Propagating dependencies leaks them through $PYTHONPATH which causes issues + # when used in nix-shell. + postFixup = '' + rm $out/nix-support/propagated-build-inputs + ''; - passthru = old.passthru // { - inherit availablePlugins selectedPlugins; - inherit withPlugins python; - tests = old.passthru.tests // { - nixos = old.passthru.tests.nixos.passthru.override { - nixopsPkg = r; + passthru = old.passthru // { + inherit availablePlugins selectedPlugins; + inherit withPlugins python; + tests = old.passthru.tests // { + nixos = old.passthru.tests.nixos.passthru.override { + nixopsPkg = r; + }; + } + # Make sure we also test with a configuration that's been extended with a plugin. + // lib.optionalAttrs (selectedPlugins == [ ]) { + withAPlugin = + lib.recurseIntoAttrs + (withPlugins (ps: with ps; [ nixops-encrypted-links ])).tests; + }; }; - } - # Make sure we also test with a configuration that's been extended with a plugin. - // lib.optionalAttrs (selectedPlugins == []) { - withAPlugin = - lib.recurseIntoAttrs - (withPlugins (ps: with ps; [ nixops-encrypted-links ])).tests; - }; - }; - })); - in r; + })); + in + r; -in { - nixops_unstable_minimal = withPlugins (ps: []); +in +{ + nixops_unstable_minimal = withPlugins (ps: [ ]); # Not recommended; too fragile. nixops_unstable_full = withPlugins (ps: [ |