Move prose
Co-authored-by: Alexander Groleau <alex@proof.construction>
This commit is contained in:
parent
559d06bbb2
commit
cec3e9441c
1 changed files with 5 additions and 5 deletions
|
@ -71,9 +71,9 @@ Each of these functions will cause a derivation to be produced. When you coerce
|
||||||
:::: {.warning}
|
:::: {.warning}
|
||||||
Some of these functions will put the resulting files within a directory inside the derivation output. If you need to refer to the resulting files somewhere else in Nix code, remember to append the path to the file For example:
|
Some of these functions will put the resulting files within a directory inside the derivation output. If you need to refer to the resulting files somewhere else in Nix code, remember to append the path to the file For example:
|
||||||
|
|
||||||
```nix
|
|
||||||
|
|
||||||
# if the derivation destination is a directory....
|
If the derivation destination is a directory...
|
||||||
|
```nix
|
||||||
|
|
||||||
my-file = writeTextFile {
|
my-file = writeTextFile {
|
||||||
name = "my-file";
|
name = "my-file";
|
||||||
|
@ -83,13 +83,13 @@ my-file = writeTextFile {
|
||||||
destination = "/share/my-file";
|
destination = "/share/my-file";
|
||||||
}
|
}
|
||||||
|
|
||||||
# remember to tack on "/share/my-file" to the derivation path when
|
|
||||||
# using it elsewhere.
|
|
||||||
|
|
||||||
writeShellScript "evaluate-my-file.sh" ''
|
writeShellScript "evaluate-my-file.sh" ''
|
||||||
cat ${my-file}/share/my-file
|
cat ${my-file}/share/my-file
|
||||||
'';
|
'';
|
||||||
```
|
```
|
||||||
|
::: {.note}
|
||||||
|
Remember to tack on "/share/my-file" to the derivation path when using it elsewhere.
|
||||||
|
:::
|
||||||
::::
|
::::
|
||||||
|
|
||||||
### `writeTextFile` {#trivial-builder-writeTextFile}
|
### `writeTextFile` {#trivial-builder-writeTextFile}
|
||||||
|
|
Loading…
Reference in a new issue