lol

trivial: make symlinkJoin support pname+version alone (#344645)

authored by philiptaron.tngl.sh and committed by

GitHub eee954a4 db44da13

+7 -4
+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
+1 -2
pkgs/by-name/tu/turbo/package.nix
··· 10 10 disableUpdateNotifier ? true, 11 11 }: 12 12 13 - symlinkJoin rec { 13 + symlinkJoin { 14 14 pname = "turbo"; 15 15 inherit (turbo-unwrapped) version; 16 - name = "${pname}-${version}"; 17 16 18 17 nativeBuildInputs = [ makeBinaryWrapper ]; 19 18