writeShellApplication: buildInputs -> runtimeInputs

+5 -5
+2 -2
doc/builders/trivial-builders.chapter.md
··· 49 49 50 50 ## `writeShellApplication` {#trivial-builder-writeShellApplication} 51 51 52 - This can be used to easily produce a shell script that has some dependencies (`buildInputs`). It automatically sets the `PATH` of the script to contain all of the listed inputs, sets some sanity shellopts (`errexit`, `nounset`, `pipefail`), and checks the resulting script with [`shellcheck`](https://github.com/koalaman/shellcheck). 52 + This can be used to easily produce a shell script that has some dependencies (`runtimeInputs`). It automatically sets the `PATH` of the script to contain all of the listed inputs, sets some sanity shellopts (`errexit`, `nounset`, `pipefail`), and checks the resulting script with [`shellcheck`](https://github.com/koalaman/shellcheck). 53 53 54 54 For example, look at the following code: 55 55 ··· 57 57 writeShellApplication { 58 58 name = "show-nixos-org"; 59 59 60 - buildInputs = [ curl w3m ]; 60 + runtimeInputs = [ curl w3m ]; 61 61 62 62 text = '' 63 63 curl -s 'https://nixos.org' | w3m -dump -T text/html
+3 -3
pkgs/build-support/trivial-builders.nix
··· 260 260 * # Writes my-file to /nix/store/<store path>/bin/my-file and makes executable. 261 261 * writeShellApplication { 262 262 * name = "my-file"; 263 - * buildInputs = [ curl w3m ]; 263 + * runtimeInputs = [ curl w3m ]; 264 264 * text = '' 265 265 * curl -s 'https://nixos.org' | w3m -dump -T text/html 266 266 * ''; ··· 269 269 writeShellApplication = 270 270 { name 271 271 , text 272 - , buildInputs ? [ ] 272 + , runtimeInputs ? [ ] 273 273 , checkPhase ? null 274 274 }: 275 275 writeTextFile { ··· 282 282 set -o nounset 283 283 set- o pipefail 284 284 285 - export PATH="${makeBinPath buildInputs}:$PATH" 285 + export PATH="${makeBinPath runtimeInputs}:$PATH" 286 286 287 287 ${text} 288 288 '';