From cec3e9441cb04878705536d2861d92060ec7f86e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 15 Jan 2024 10:49:36 -0500 Subject: [PATCH] Move prose Co-authored-by: Alexander Groleau --- doc/build-helpers/trivial-build-helpers.chapter.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md index 398fb60fc880..d90fee192b25 100644 --- a/doc/build-helpers/trivial-build-helpers.chapter.md +++ b/doc/build-helpers/trivial-build-helpers.chapter.md @@ -71,9 +71,9 @@ Each of these functions will cause a derivation to be produced. When you coerce :::: {.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: -```nix -# if the derivation destination is a directory.... +If the derivation destination is a directory... +```nix my-file = writeTextFile { name = "my-file"; @@ -83,13 +83,13 @@ my-file = writeTextFile { destination = "/share/my-file"; } -# remember to tack on "/share/my-file" to the derivation path when -# using it elsewhere. - writeShellScript "evaluate-my-file.sh" '' 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}