diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-06-21 08:14:34 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2022-06-21 09:23:13 +0100 |
commit | db09d70d33dc9ceca01288d9ceef10befd2851e2 (patch) | |
tree | 3a9b684973ba5c7cf3510f19a9d14ca2e51857fc | |
parent | b76e4a37da9b7c549eb01836b73ff14a8b353d44 (diff) |
config.configurePlatformsByDefault: init option
Useful to enable tree-wide occasionally to have incremental progress towards https://github.com/NixOS/nixpkgs/pull/87909 resolution.
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/config.nix | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 5f1a22cee06f3..5f5ac44c979e1 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -111,9 +111,9 @@ let , # Target is not included by default because most programs don't care. # Including it then would cause needless mass rebuilds. # - # TODO(@Ericson2314): Make [ "build" "host" ] always the default. + # TODO(@Ericson2314): Make [ "build" "host" ] always the default / resolve #87909 configurePlatforms ? lib.optionals - (stdenv.hostPlatform != stdenv.buildPlatform) + (stdenv.hostPlatform != stdenv.buildPlatform || config.configurePlatformsByDefault) [ "build" "host" ] # TODO(@Ericson2314): Make unconditional / resolve #33599 diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index e9cb8681f653e..0ab29d8516365 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -50,6 +50,10 @@ let feature = "set <literal>enableParallelBuilding</literal> to true by default"; }; + configurePlatformsByDefault = mkMassRebuild { + feature = "set <literal>configurePlatforms</literal> to <literal>[\"build\" \"host\"]</literal> by default"; + }; + contentAddressedByDefault = mkMassRebuild { feature = "set <literal>__contentAddressed</literal> to true by default"; }; |