mirror of
https://github.com/NixOS/rfcs.git
synced 2025-12-24 09:51:07 +01:00
Add example to flake names
This commit is contained in:
parent
bae96eaadb
commit
53b1dc7eb0
1 changed files with 21 additions and 1 deletions
|
|
@ -31,7 +31,27 @@ The derivation that contains the flake’s content is called `flake-source-${nam
|
|||
# Examples and Interactions
|
||||
[examples-and-interactions]: #examples-and-interactions
|
||||
|
||||
None
|
||||
Example:
|
||||
|
||||
File `./example/flake.nix`
|
||||
```nix
|
||||
{
|
||||
name = "example";
|
||||
outputs = { ... }: {
|
||||
lib.example = "example";
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Shell
|
||||
```console
|
||||
$ nix eval git+file://./example
|
||||
[…] copying flake-source-example
|
||||
"example"
|
||||
$ nix flake metadata ./example
|
||||
Name: example
|
||||
Resolved URL: …
|
||||
```
|
||||
|
||||
# Drawbacks
|
||||
[drawbacks]: #drawbacks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue