summaryrefslogtreecommitdiff
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
parentcni-plugins: 0.7.4 -> 0.7.5 (#58655) (diff)
downloadnixpkgs-origin/writeTextFile-fix-comment.tar.gz
trivial-builders: Fix outdated comment on writeTextFileorigin/writeTextFile-fix-comment
-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 ab83b73c5455..592af3fe4f20 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