diff options
author | Robert Hensing <robert@roberthensing.nl> | 2024-02-28 23:16:59 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2024-03-06 22:47:24 +0100 |
commit | 8b9543baac8c68e46382edc92ff3c65294af1310 (patch) | |
tree | 2af146898d9c8589fd53b234e463c417088f6b94 | |
parent | 88e807a141d2d5e9049083381ec2a9ac9148455a (diff) |
nixops_unstable_*: Forward overrideAttrs
-rw-r--r-- | pkgs/applications/networking/cluster/nixops/default.nix | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/pkgs/applications/networking/cluster/nixops/default.nix b/pkgs/applications/networking/cluster/nixops/default.nix index 4d61e019a33e9..058400c2d94d0 100644 --- a/pkgs/applications/networking/cluster/nixops/default.nix +++ b/pkgs/applications/networking/cluster/nixops/default.nix @@ -54,24 +54,30 @@ let postFixup = '' rm $out/nix-support/propagated-build-inputs ''; + })); - passthru = old.passthru // { - inherit (this) selectedPlugins availablePlugins withPlugins python; - tests = old.passthru.tests // { - nixos = old.passthru.tests.nixos.passthru.override { - nixopsPkg = rawPackage; - }; - } - # Make sure we also test with a configuration that's been extended with a plugin. - // lib.optionalAttrs (this.selectedPlugins == [ ]) { - withAPlugin = - lib.recurseIntoAttrs - (this.withPlugins (ps: with ps; [ nixops-encrypted-links ])).tests; + # Extra package attributes that aren't derivation attributes, just like `mkDerivation`'s `passthru`. + extraPackageAttrs = { + inherit (this) selectedPlugins availablePlugins withPlugins python; + tests = this.rawPackage.tests // { + nixos = this.rawPackage.tests.nixos.passthru.override { + nixopsPkg = this.rawPackage; }; + } + # Make sure we also test with a configuration that's been extended with a plugin. + // lib.optionalAttrs (this.selectedPlugins == [ ]) { + withAPlugin = + lib.recurseIntoAttrs + (this.withPlugins (ps: with ps; [ nixops-encrypted-links ])).tests; }; - })); + overrideAttrs = f: this.extend (this: oldThis: { + rawPackage = oldThis.rawPackage.overrideAttrs f; + }); + }; + + package = lib.lazyDerivation { outputs = [ "out" "dist" ]; derivation = this.rawPackage; } // this.extraPackageAttrs; - public = this.rawPackage; + public = this.package; }; minimal = encapsulate nixopsContextBase; |