about summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-13 12:33:00 +0200
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-13 12:33:00 +0200
commit851c0f1cb782bcc476ec115a72d0329da4af68dc (patch)
treecaa396be75e3c908be7c6c404523f05077fe51e9 /pkgs/stdenv
parentfe0524cd7dfebc237eff2fc8969d507f84ec2b13 (diff)
stdenv/make-derivation: add -static to name if building statically
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/make-derivation.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index 65ef2ea283478..74609412782c9 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