···193 "__darwinAllowLocalNetworking"
194 "__impureHostDeps" "__propagatedImpureHostDeps"
195 "sandboxProfile" "propagatedSandboxProfile"])
196- // (lib.optionalAttrs (!(attrs ? name) && attrs ? pname && attrs ? version)) {
197- name = "${attrs.pname}-${attrs.version}";
198- } // (lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix && (attrs ? name || (attrs ? pname && attrs ? version)))) {
199- # Fixed-output derivations like source tarballs shouldn't get a host
200- # suffix. But we have some weird ones with run-time deps that are
201- # just used for their side-affects. Those might as well since the
202- # hash can't be the same. See #32986.
203- name = "${attrs.name or "${attrs.pname}-${attrs.version}"}-${stdenv.hostPlatform.config}";
204- } // {
000000205 builder = attrs.realBuilder or stdenv.shell;
206 args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
207 inherit stdenv;
···193 "__darwinAllowLocalNetworking"
194 "__impureHostDeps" "__propagatedImpureHostDeps"
195 "sandboxProfile" "propagatedSandboxProfile"])
196+ // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
197+ name =
198+ let
199+ staticMarker = lib.optionalString stdenv.hostPlatform.isStatic "-static";
200+ name' = attrs.name or
201+ "${attrs.pname}${staticMarker}-${attrs.version}";
202+ # Fixed-output derivations like source tarballs shouldn't get a host
203+ # suffix. But we have some weird ones with run-time deps that are
204+ # just used for their side-affects. Those might as well since the
205+ # hash can't be the same. See #32986.
206+ hostSuffix = lib.optionalString
207+ (stdenv.hostPlatform != stdenv.buildPlatform && !dontAddHostSuffix)
208+ "-${stdenv.hostPlatform.config}";
209+ in name' + hostSuffix;
210+ }) // {
211 builder = attrs.realBuilder or stdenv.shell;
212 args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
213 inherit stdenv;