aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/doc/languages-frameworks/rust.section.md
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-01-10 20:09:37 +0000
committerKatharina Fey <kookie@spacekookie.de>2020-01-10 20:09:37 +0000
commit45431c078bf8f54aef7c9fae2e5913395ec82c31 (patch)
treefd8ff1346a963ddd72e782421f05b623f9759e2a /nixpkgs/doc/languages-frameworks/rust.section.md
parentc86fea6086c212ea489cfb023a5f5c9c8f188810 (diff)
parent3ccbc8d89153ecf13f3eae7d9c106d91cd4ab9e5 (diff)
Merge commit '3ccbc8d89153ecf13f3eae7d9c106d91cd4ab9e5' into fuckthisshit
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/rust.section.md')
-rw-r--r--nixpkgs/doc/languages-frameworks/rust.section.md15
1 files changed, 13 insertions, 2 deletions
diff --git a/nixpkgs/doc/languages-frameworks/rust.section.md b/nixpkgs/doc/languages-frameworks/rust.section.md
index 83b7b159bd6..709a0d504cf 100644
--- a/nixpkgs/doc/languages-frameworks/rust.section.md
+++ b/nixpkgs/doc/languages-frameworks/rust.section.md
@@ -4,7 +4,7 @@ author: Matthias Beyer
date: 2017-03-05
---
-# User's Guide to the Rust Infrastructure
+# Rust
To install the rust compiler and cargo put
@@ -68,6 +68,17 @@ build-time.
When `verifyCargoDeps` is set to `true`, the build will also verify that the
`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future.
+### Building a crate for a different target
+
+To build your crate with a different cargo `--target` simply specify the `target` attribute:
+
+```nix
+pkgs.rustPlatform.buildRustPackage {
+ (...)
+ target = "x86_64-fortanix-unknown-sgx";
+}
+```
+
## Compiling Rust crates using Nix instead of Cargo
### Simple operation
@@ -192,7 +203,7 @@ argument and returns a set that contains all attribute that should be
overwritten.
For more complicated cases, such as when parts of the crate's
-derivation depend on the the crate's version, the `attrs` argument of
+derivation depend on the crate's version, the `attrs` argument of
the override above can be read, as in the following example, which
patches the derivation: