mpvScripts: Immediately error on collisions between scope
and aliases
This makes mistakes more obvious, and ensures the error happens independently of config.allowAliases, so any build will catch it.
This commit is contained in:
parent
08de7bd961
commit
ef51456d0f
1 changed files with 4 additions and 2 deletions
|
@ -84,13 +84,15 @@ let
|
|||
webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { };
|
||||
};
|
||||
|
||||
aliases = lib.optionalAttrs config.allowAliases {
|
||||
aliases = {
|
||||
youtube-quality = throw "'youtube-quality' is no longer maintained, use 'quality-menu' instead"; # added 2023-07-14
|
||||
};
|
||||
in
|
||||
|
||||
with lib; pipe scope [
|
||||
(makeScope newScope)
|
||||
(attrsets.unionOfDisjoint aliases)
|
||||
(self:
|
||||
assert builtins.intersectAttrs self aliases == {};
|
||||
self // optionalAttrs config.allowAliases aliases)
|
||||
recurseIntoAttrs
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue