Skip to content

Commit

Permalink
trivial: only allow name or pname+version in symlinkJoin
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Taron <[email protected]>
  • Loading branch information
pbsds and philiptaron committed Sep 28, 2024
1 parent 169d2c6 commit 42ab48f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/build-support/trivial-builders/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ rec {
, postBuild ? ""
, ...
}:
assert lib.assertMsg (args_ ? pname == args_ ? version) "symlinkJoin requires `pname` and `version` to be specified together";
assert lib.assertMsg (args_ ? name -> !(args_ ? pname || args_ ? version)) "symlinkJoin requires either `name` or `pname` and `version`; to fix this, remove `name` or both of `pname` and `version`";
let
args = removeAttrs args_ [ "name" "postBuild" ]
// {
Expand Down

0 comments on commit 42ab48f

Please sign in to comment.