mirror of
https://github.com/nix-community/flakelight.git
synced 2025-06-21 01:57:57 +02:00
Update Rust example in README
This commit is contained in:
parent
a463960781
commit
d75f8fea8b
14
README.md
14
README.md
@ -59,9 +59,19 @@ available.
|
|||||||
|
|
||||||
### Rust package
|
### Rust package
|
||||||
|
|
||||||
The following is an example flake for a Rust project using `flakelight-rust`.
|
The following is an example flake for a Rust project using `flakelight-rust`,
|
||||||
|
invoked by using `flakelight-rust`'s wrapper.
|
||||||
Package metadata is taken from the project's `Cargo.toml`.
|
Package metadata is taken from the project's `Cargo.toml`.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs.flakelight-rust.url = "github:accelbread/flakelight-rust";
|
||||||
|
outputs = { flakelight-rust, ... }: flakelight-rust ./. { };
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can just use the `flakelight-rust` module as follows:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
@ -74,7 +84,7 @@ Package metadata is taken from the project's `Cargo.toml`.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This flake exports the following:
|
The above flakes export the following:
|
||||||
|
|
||||||
- Per-system attributes for default systems (`x86_64-linux` and `aarch64-linux`)
|
- Per-system attributes for default systems (`x86_64-linux` and `aarch64-linux`)
|
||||||
- `packages.${system}.default` attributes for each system
|
- `packages.${system}.default` attributes for each system
|
||||||
|
Loading…
x
Reference in New Issue
Block a user