diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-28 19:32:43 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-28 19:36:28 +0000 |
commit | b7650aaa77634e42d62ed6fc1a9081b10139618b (patch) | |
tree | 3afac7f7da8225fda6adcbeeb0f7e29481b8025d /doc/languages-frameworks | |
parent | 8ddf5c69077a6afda88a3ae72f10fdff031f75b8 (diff) |
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.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/rust.section.md | 14 |
1 files changed, 7 insertions, 7 deletions
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 <nixpkgs> { crossSystem = (import <nixpkgs/lib>).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 <nixpkgs> { crossSystem = (import <nixpkgs/lib>).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: |