diff --git a/pkgs/top-level/splice.nix b/pkgs/top-level/splice.nix index 3b600c22f60e85..4ec05284e4501c 100644 --- a/pkgs/top-level/splice.nix +++ b/pkgs/top-level/splice.nix @@ -25,8 +25,21 @@ let , pkgsHostHost , pkgsHostTarget , pkgsTargetTarget - }: + }@args: let + tryGetAttrs = value0: + let + inherit (builtins.tryEval value0) success value; + in + lib.optionalAttrs success value; + + pkgsBuildBuild = tryGetAttrs args.pkgsBuildBuild; + pkgsBuildHost = tryGetAttrs args.pkgsBuildHost; + pkgsBuildTarget = tryGetAttrs args.pkgsBuildTarget; + pkgsHostHost = tryGetAttrs args.pkgsHostHost; + pkgsHostTarget = tryGetAttrs args.pkgsHostTarget; + pkgsTargetTarget = tryGetAttrs args.pkgsTargetTarget; + mash = # Other pkgs sets pkgsBuildBuild // pkgsBuildTarget // pkgsHostHost // pkgsTargetTarget