From 55195119d529d65e264bcae9ce2741827272efb4 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Mon, 24 Aug 2020 21:46:48 -0400 Subject: [PATCH] Distinguish pkgsStatic from pkgsMusl via stdenv.targetPlatform This change allows derivations to distinguish dynamic musl build and static musl build in cases where upstream build system can't detect it by itself. --- lib/systems/default.nix | 1 + pkgs/top-level/stage.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index c929781dd8ff..09884d406823 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -76,6 +76,7 @@ rec { # uname -r release = null; }; + isStatic = final.isWasm || final.isRedox; kernelArch = if final.isAarch32 then "arm" diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 9e07d2bf0614..58b0300cc79c 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -215,6 +215,7 @@ let crossOverlays = [ (import ./static.nix) ]; } // lib.optionalAttrs stdenv.hostPlatform.isLinux { crossSystem = { + isStatic = true; parsed = stdenv.hostPlatform.parsed // { abi = { gnu = lib.systems.parse.abis.musl;