summary refs log tree commit diff
path: root/pkgs/build-support/trivial-builders.nix
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2019-04-08 00:38:13 +0200
committerNiklas Hambüchen <mail@nh2.me>2019-04-08 01:12:50 +0200
commitc4c2aa6586ae6477cab101f19e0316c046110baf (patch)
tree37993444139376ea9f5c611ad6c7ddcc7fc648d9 /pkgs/build-support/trivial-builders.nix
parentcb93ae7eb388390199e583b65f7cb254514ee92b (diff)
downloadnixpkgs-c4c2aa6586ae6477cab101f19e0316c046110baf.tar
nixpkgs-c4c2aa6586ae6477cab101f19e0316c046110baf.tar.gz
nixpkgs-c4c2aa6586ae6477cab101f19e0316c046110baf.tar.bz2
nixpkgs-c4c2aa6586ae6477cab101f19e0316c046110baf.tar.lz
nixpkgs-c4c2aa6586ae6477cab101f19e0316c046110baf.tar.xz
nixpkgs-c4c2aa6586ae6477cab101f19e0316c046110baf.tar.zst
nixpkgs-c4c2aa6586ae6477cab101f19e0316c046110baf.zip
trivial-builders: Fix outdated comment on writeTextFile
Diffstat (limited to 'pkgs/build-support/trivial-builders.nix')
-rw-r--r--pkgs/build-support/trivial-builders.nix24
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix
index ab83b73c545..592af3fe4f2 100644
--- a/pkgs/build-support/trivial-builders.nix
+++ b/pkgs/build-support/trivial-builders.nix
@@ -32,19 +32,23 @@ rec {
    *
    * Examples:
    * # Writes my-file to /nix/store/<store path>
-   * writeTextFile "my-file"
-   *   ''
-   *   Contents of File
+   * writeTextFile {
+   *   name = "my-file";
+   *   text = ''
+   *     Contents of File
    *   '';
+   * }
+   * # See also the `writeText` helper function below.
    *
    * # Writes executable my-file to /nix/store/<store path>/bin/my-file
-   * writeTextFile "my-file"
-   *   ''
-   *   Contents of File
-   *   ''
-   *   true
-   *   "/bin/my-file";
-   *   true
+   * writeTextFile {
+   *   name = "my-file";
+   *   text = ''
+   *     Contents of File
+   *   '';
+   *   executable = true;
+   *   destination = "/bin/my-file";
+   * }
    */
   writeTextFile =
     { name # the name of the derivation