diff options
author | Florian Klink <flokli@flokli.de> | 2024-06-13 21:00:43 +0300 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2024-06-13 21:08:48 +0300 |
commit | 50261c0602f9df33074dae65c871d354517db4f7 (patch) | |
tree | 58090fcd0380f63582c1a3357c07cd218b4f83d7 /doc | |
parent | e913ae340076bbb73d9f4d3d065c2bca7caafb16 (diff) |
config.rust: update references from rustc
`rustc.config` is called `rust.rustcTarget` now, and
`{rustc -> rust}.platform`.
This is the new way (tm), and is preferred since
https://github.com/NixOS/nixpkgs/pull/271707 -
though the documentation still is outdated, and some expressions in
nixpkgs were using the old interface.
This updates both.
Diffstat (limited to 'doc')
-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 8a1007b7bb8a..e12bbe02bfb5 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -254,7 +254,7 @@ 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.config` as that name (a string), and that + `stdenv.hostPlatform.rust.rustcTarget` as that name (a string), and that name will be used instead. For example: @@ -262,7 +262,7 @@ where they are known to differ. But there are ways to customize the argument: ```nix import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // { - rustc.config = "thumbv7em-none-eabi"; + rust.rustcTarget = "thumbv7em-none-eabi"; }; } ``` @@ -274,10 +274,10 @@ where they are known to differ. But there are ways to customize the argument: ``` - To pass a completely custom target, define - `stdenv.hostPlatform.rustc.config` with its name, and - `stdenv.hostPlatform.rustc.platform` with the value. The value will be + `stdenv.hostPlatform.rust.rustcTarget` with its name, and + `stdenv.hostPlatform.rust.platform` with the value. The value will be serialized to JSON in a file called - `${stdenv.hostPlatform.rustc.config}.json`, and the path of that file + `${stdenv.hostPlatform.rust.rustcTarget}.json`, and the path of that file will be used instead. For example: @@ -285,8 +285,8 @@ where they are known to differ. But there are ways to customize the argument: ```nix import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // { - rustc.config = "thumb-crazy"; - rustc.platform = { foo = ""; bar = ""; }; + rust.rustcTarget = "thumb-crazy"; + rust.platform = { foo = ""; bar = ""; }; }; } ``` |