trivial: make symlinkJoin support pname+version alone

+6 -2
+1 -1
doc/build-helpers/trivial-build-helpers.chapter.md
··· 732 732 733 733 ## `symlinkJoin` {#trivial-builder-symlinkJoin} 734 734 735 - 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. 735 + 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. 736 736 Here is an example: 737 737 ```nix 738 738 # adds symlinks of hello and stack to current build and prints "links added"
+5 -1
pkgs/build-support/trivial-builders/default.nix
··· 469 469 as a easy way to build multiple derivations at once. 470 470 */ 471 471 symlinkJoin = 472 - args_@{ name 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}" 473 477 , paths 474 478 , preferLocalBuild ? true 475 479 , allowSubstitutes ? false