From b4b95be5888268c61342f3c79a61e1bc129c8051 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 21 Aug 2024 04:00:45 +0000 Subject: [PATCH] make-sandboxed: fix to preserve the specified output, for packages like `dig` --- modules/programs/make-sandboxed.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/programs/make-sandboxed.nix b/modules/programs/make-sandboxed.nix index 8649eb2b5..f9ccfbd13 100644 --- a/modules/programs/make-sandboxed.nix +++ b/modules/programs/make-sandboxed.nix @@ -500,12 +500,16 @@ let ''; }; packageWrapped = sandboxedBy."${wrapperType}"; - in - fixupMetaAndPassthru pkgName packageWrapped (passthru // { + packageWithMeta = fixupMetaAndPassthru pkgName packageWrapped (passthru // { # allow the user to build this package, but sandboxed in a different manner. # e.g. `.sandboxedBy.inplace`. # e.g. `.sandboxedBy.wrappedDerivation.sandboxedNonBin` inherit sandboxedBy; - }) + }); + in if package.outputSpecified or false then + # packages like `dig` are actually aliases to `bind.dnsutils`, so preserve that + packageWithMeta."${package.outputName}" + else + packageWithMeta ; in make-sandboxed