docs: update docs for rust subsystem

This commit is contained in:
Yusuf Bera Ertan 2022-12-18 02:31:43 +03:00
parent 80ff2b4a86
commit a24fb71c40
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -14,11 +14,11 @@ Translates a `Cargo.toml` file to a dream2nix lockfile by generating a `Cargo.lo
## Builders
### build-rust-package (pure) (default)
### build-rust-package (pure)
Builds a package using `buildRustPackage` from `nixpkgs`.
### crane (ifd)
### crane (ifd) (default)
Builds a package using [`crane`](https://github.com/ipetkov/crane).
This builder builds two separate derivations, one for dependencies and the other for your crate.
@ -173,3 +173,19 @@ in
# ...
}
```
### Specifying the `stdenv`
`crane` supports specifying the `stdenv` like so:
```nix
{
# ...
packageOverrides = {
# change all derivations' stdenv to clangStdenv
"^.*".set-stdenv.override = old: {stdenv = pkgs.clangStdenv;};
};
# ...
}
```
`build-rust-package` builder does not support specifying the `stdenv`.