about summary refs log tree commit diff
path: root/doc/build-helpers/trivial-build-helpers.chapter.md
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-03-19 12:01:19 +0000
committerGitHub <noreply@github.com>2024-03-19 12:01:19 +0000
commit0b369088d7534278bd67cf848fe30b786895faf3 (patch)
tree15e986a56ec34f5e8305ebb827618ad2a2f819f1 /doc/build-helpers/trivial-build-helpers.chapter.md
parentf95ae9e1268a76252f3c912b433b03bed30c0e8c (diff)
parentcd42480049d3d6f1180cdc5548d987add0cc529f (diff)
downloadnixlib-0b369088d7534278bd67cf848fe30b786895faf3.tar
nixlib-0b369088d7534278bd67cf848fe30b786895faf3.tar.gz
nixlib-0b369088d7534278bd67cf848fe30b786895faf3.tar.bz2
nixlib-0b369088d7534278bd67cf848fe30b786895faf3.tar.lz
nixlib-0b369088d7534278bd67cf848fe30b786895faf3.tar.xz
nixlib-0b369088d7534278bd67cf848fe30b786895faf3.tar.zst
nixlib-0b369088d7534278bd67cf848fe30b786895faf3.zip
Merge master into staging-next
Diffstat (limited to 'doc/build-helpers/trivial-build-helpers.chapter.md')
-rw-r--r--doc/build-helpers/trivial-build-helpers.chapter.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md
index 8354ee23b2db..6d14db639938 100644
--- a/doc/build-helpers/trivial-build-helpers.chapter.md
+++ b/doc/build-helpers/trivial-build-helpers.chapter.md
@@ -658,14 +658,18 @@ This creates a derivation with a directory structure like the following:
 
 ## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
 
-Writes the closure of transitive dependencies to a file.
+Deprecated. Use [`writeClosure`](#trivial-builder-writeClosure) instead.
 
-This produces the equivalent of `nix-store -q --requisites`.
+## `writeClosure` {#trivial-builder-writeClosure}
+
+Given a list of [store paths](https://nixos.org/manual/nix/stable/glossary#gloss-store-path) (or string-like expressions coercible to store paths), write their collective [closure](https://nixos.org/manual/nix/stable/glossary#gloss-closure) to a text file.
+
+The result is equivalent to the output of `nix-store -q --requisites`.
 
 For example,
 
 ```nix
-writeReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
+writeClosure [ (writeScriptBin "hi" ''${hello}/bin/hello'') ]
 ```
 
 produces an output path `/nix/store/<hash>-runtime-deps` containing