From 354aab19f93fa544926928c8cb3edb813afb7285 Mon Sep 17 00:00:00 2001 From: Ross Smyth <18294397+RossSmyth@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:50:24 -0500 Subject: [PATCH] applyPatches: unconditionally set attrsets that are always set regardless --- pkgs/build-support/trivial-builders/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 220b3d7d5953..0a1af075bc5d 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -1077,14 +1077,12 @@ rec { doDist = false; installPhase = "cp -R ./ $out"; - } - # Carry (and merge) information from the underlying `src` if present. - // (optionalAttrs (src ? meta) { - meta = removeAttrs src.meta [ "position" ]; - }) - // (optionalAttrs (extraPassthru != { } || src ? passthru) { + passthru = extraPassthru // src.passthru or { }; - }); + + # Carry (and merge) information from the underlying `src` if present. + meta = lib.optionalAttrs (src ? meta) (removeAttrs src.meta) [ "position" ]; + }; }; # TODO: move docs to Nixpkgs manual