···732733## `symlinkJoin` {#trivial-builder-symlinkJoin}
734735-This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, `name`, and `paths`. `name` is the name used in the Nix store path for the created derivation. `paths` is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
736Here is an example:
737```nix
738# adds symlinks of hello and stack to current build and prints "links added"
···732733## `symlinkJoin` {#trivial-builder-symlinkJoin}
734735+This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, `name`, and `paths`. `name` (or alternatively `pname` and `version`) is the name used in the Nix store path for the created derivation. `paths` is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
736Here is an example:
737```nix
738# adds symlinks of hello and stack to current build and prints "links added"
+5-1
pkgs/build-support/trivial-builders/default.nix
···469 as a easy way to build multiple derivations at once.
470 */
471 symlinkJoin =
472- args_@{ name
0000473 , paths
474 , preferLocalBuild ? true
475 , allowSubstitutes ? false
···469 as a easy way to build multiple derivations at once.
470 */
471 symlinkJoin =
472+ args_@{
473+ name ?
474+ assert lib.assertMsg (args_ ? pname && args_ ? version)
475+ "symlinkJoin requires either a `name` OR `pname` and `version`";
476+ "${args_.pname}-${args_.version}"
477 , paths
478 , preferLocalBuild ? true
479 , allowSubstitutes ? false