From 851c0f1cb782bcc476ec115a72d0329da4af68dc Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 13 Apr 2021 12:33:00 +0200 Subject: [PATCH] stdenv/make-derivation: add -static to name if building statically --- pkgs/stdenv/generic/make-derivation.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 65ef2ea2834..74609412782 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -196,8 +196,9 @@ in rec { // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) { name = let + staticMarker = lib.optionalString stdenv.hostPlatform.isStatic "-static"; name' = attrs.name or - "${attrs.pname}-${attrs.version}"; + "${attrs.pname}${staticMarker}-${attrs.version}"; # Fixed-output derivations like source tarballs shouldn't get a host # suffix. But we have some weird ones with run-time deps that are # just used for their side-affects. Those might as well since the