0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

doc: fix various nix snippets

This commit is contained in:
Pol Dellaiera 2025-04-17 20:46:20 +02:00 committed by Valentin Gagarin
parent 64a347a04d
commit 51ffa11b12
5 changed files with 37 additions and 17 deletions

View file

@ -20,12 +20,12 @@ Converts Nix values to strings in the way the [`derivation` built-in function](h
```nix
devShellTools.valueToString (builtins.toFile "foo" "bar")
=> "/nix/store/...-foo"
# => "/nix/store/...-foo"
```
```nix
devShellTools.valueToString false
=> ""
# => ""
```
:::
@ -47,11 +47,11 @@ devShellTools.unstructuredDerivationInputEnv {
args = [ "-c" "${./builder.sh}" ];
};
}
=> {
name = "foo";
buildInputs = "/nix/store/...-hello /nix/store/...-figlet";
builder = "/nix/store/...-bash";
}
# => {
# name = "foo";
# buildInputs = "/nix/store/...-hello /nix/store/...-figlet";
# builder = "/nix/store/...-bash";
# }
```
Note that `args` is not included, because Nix does not added it to the builder process environment.