From b7650aaa77634e42d62ed6fc1a9081b10139618b Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 28 Nov 2020 19:32:43 +0000 Subject: rust: Clean up target configs and test some more See the new docs for details. The difference is vis-a-vis older versions of this PR, not master. --- doc/languages-frameworks/rust.section.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 28e488fe8a6cc..0230993d3f083 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -71,14 +71,14 @@ By default, it takes the `stdenv.hostPlatform.config` and replaces components where they are known to differ. But there are ways to customize the argument: - To choose a different target by name, define - `stdenv.hostPlatform.rustc.arch.config` as that name (a string), and that + `stdenv.hostPlatform.rustc.config` as that name (a string), and that name will be used instead. For example: ```nix import { crossSystem = (import ).systems.examples.armhf-embedded // { - rustc.arch.config = "thumbv7em-none-eabi"; + rustc.config = "thumbv7em-none-eabi"; }; } ``` @@ -88,18 +88,18 @@ where they are known to differ. But there are ways to customize the argument: ``` - To pass a completely custom target, define - `stdenv.hostPlatform.rustc.arch.config` with its name, and - `stdenv.hostPlatform.rustc.arch.custom` with the value. The value will be + `stdenv.hostPlatform.rustc.config` with its name, and + `stdenv.hostPlatform.rustc.platform` with the value. The value will be serialized to JSON in a file called - `${stdenv.hostPlatform.rustc.arch.config}.json`, and the path of that file + `${stdenv.hostPlatform.rustc.config}.json`, and the path of that file will be used instead. For example: ```nix import { crossSystem = (import ).systems.examples.armhf-embedded // { - rustc.arch.config = "thumb-crazy"; - rustc.arch.custom = { foo = ""; bar = ""; }; + rustc.config = "thumb-crazy"; + rustc.platform = { foo = ""; bar = ""; }; }; } will result in: -- cgit 1.4.1