···193193 "__darwinAllowLocalNetworking"
194194 "__impureHostDeps" "__propagatedImpureHostDeps"
195195 "sandboxProfile" "propagatedSandboxProfile"])
196196- // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
197197- name = "${attrs.pname}-${attrs.version}";
198198- } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {
199199- # Fixed-output derivations like source tarballs shouldn't get a host
200200- # suffix. But we have some weird ones with run-time deps that are
201201- # just used for their side-affects. Those might as well since the
202202- # hash can't be the same. See #32986.
203203- name = "${attrs.name or "${attrs.pname}-${attrs.version}"}-${stdenv.hostPlatform.config}";
204204- } // {
196196+ // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
197197+ name =
198198+ let
199199+ staticMarker = lib.optionalString stdenv.hostPlatform.isStatic "-static";
200200+ name' = attrs.name or
201201+ "${attrs.pname}${staticMarker}-${attrs.version}";
202202+ # Fixed-output derivations like source tarballs shouldn't get a host
203203+ # suffix. But we have some weird ones with run-time deps that are
204204+ # just used for their side-affects. Those might as well since the
205205+ # hash can't be the same. See #32986.
206206+ hostSuffix = lib.optionalString
207207+ (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)
208208+ "-${stdenv.hostPlatform.config}";
209209+ in name' + hostSuffix;
210210+ }) // {
205211 builder = attrs.realBuilder or stdenv.shell;
206212 args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
207213 inherit stdenv;