diff options
author | nicoo <nicoo@mur.at> | 2023-12-27 22:59:08 +0000 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2023-12-29 11:03:05 +0000 |
commit | 08de7bd96147bca47ee7428c620707cbb34cef9f (patch) | |
tree | 6158f8947fa26282b6635ec657bb9872bc4afd6a | |
parent | 614afa6014f7d289f606c46c6840c81976948a3a (diff) |
mpvScripts: Refactor `default.nix`
It seems a bit easier to follow what is going on
-rw-r--r-- | pkgs/applications/video/mpv/scripts/default.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index 98860e1f2cba4..2c310cd410b6b 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -54,10 +54,9 @@ let ''; }) ]; }; }); -in -lib.recurseIntoAttrs (lib.makeScope newScope (self: - let inherit (self) callPackage; + scope = self: let + inherit (self) callPackage; in lib.mapAttrs addTests { inherit (callPackage ./mpv.nix { }) acompressor autocrop autodeint autoload; @@ -83,7 +82,15 @@ lib.recurseIntoAttrs (lib.makeScope newScope (self: visualizer = callPackage ./visualizer.nix { }; vr-reversal = callPackage ./vr-reversal.nix { }; webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { }; - } - // lib.optionalAttrs config.allowAliases { - youtube-quality = throw "'youtube-quality' is no longer maintained, use 'quality-menu' instead"; # added 2023-07-14 - })) + }; + + aliases = lib.optionalAttrs config.allowAliases { + 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) + recurseIntoAttrs +] |