···658659## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
660661-Writes the closure of transitive dependencies to a file.
662663-This produces the equivalent of `nix-store -q --requisites`.
0000664665For example,
666667```nix
668-writeReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
669```
670671produces an output path `/nix/store/<hash>-runtime-deps` containing
···658659## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
660661+Deprecated. Use [`writeClosure`](#trivial-builder-writeClosure) instead.
662663+## `writeClosure` {#trivial-builder-writeClosure}
664+665+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.
666+667+The result is equivalent to the output of `nix-store -q --requisites`.
668669For example,
670671```nix
672+writeClosure [ (writeScriptBin "hi" ''${hello}/bin/hello'') ]
673```
674675produces an output path `/nix/store/<hash>-runtime-deps` containing
+2
nixos/doc/manual/release-notes/rl-2405.section.md
···171172- Invidious has changed its default database username from `kemal` to `invidious`. Setups involving an externally provisioned database (i.e. `services.invidious.database.createLocally == false`) should adjust their configuration accordingly. The old `kemal` user will not be removed automatically even when the database is provisioned automatically.(https://github.com/NixOS/nixpkgs/pull/265857)
17300174- `inetutils` now has a lower priority to avoid shadowing the commonly used `util-linux`. If one wishes to restore the default priority, simply use `lib.setPrio 5 inetutils` or override with `meta.priority = 5`.
175176- `paperless`' `services.paperless.extraConfig` setting has been removed and converted to the freeform type and option named `services.paperless.settings`.
···171172- Invidious has changed its default database username from `kemal` to `invidious`. Setups involving an externally provisioned database (i.e. `services.invidious.database.createLocally == false`) should adjust their configuration accordingly. The old `kemal` user will not be removed automatically even when the database is provisioned automatically.(https://github.com/NixOS/nixpkgs/pull/265857)
173174+- `writeReferencesToFile` is deprecated in favour of the new trivial build helper `writeClosure`. The latter accepts a list of paths and has an unambiguous name and cleaner implementation.
175+176- `inetutils` now has a lower priority to avoid shadowing the commonly used `util-linux`. If one wishes to restore the default priority, simply use `lib.setPrio 5 inetutils` or override with `meta.priority = 5`.
177178- `paperless`' `services.paperless.extraConfig` setting has been removed and converted to the freeform type and option named `services.paperless.settings`.
-18
nixos/tests/nixops/default.nix
···9394 inherit (import ../ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey;
9596- /*
97- Return a store path with a closure containing everything including
98- derivations and all build dependency outputs, all the way down.
99- */
100- allDrvOutputs = pkg:
101- let name = "allDrvOutputs-${pkg.pname or pkg.name or "unknown"}";
102- in
103- pkgs.runCommand name { refs = pkgs.writeReferencesToFile pkg.drvPath; } ''
104- touch $out
105- while read ref; do
106- case $ref in
107- *.drv)
108- cat $ref >>$out
109- ;;
110- esac
111- done <$refs
112- '';
113-114in
115tests
···8# and how deep in the tree they live. Equally-"popular" paths are then
9# sorted by name.
10#
11-# The existing writeReferencesToFile prints the paths in a simple
12-# ascii-based sorting of the paths.
13#
14# Sorting the paths by graph improves the chances that the difference
15# between two builds appear near the end of the list, instead of near
···8# and how deep in the tree they live. Equally-"popular" paths are then
9# sorted by name.
10#
11+# The existing writeClosure prints the paths in a simple ascii-based
12+# sorting of the paths.
13#
14# Sorting the paths by graph improves the chances that the difference
15# between two builds appear near the end of the list, instead of near