mpvScripts.buildLua: Expose to nixpkgs users

This commit is contained in:
nicoo 2023-12-09 15:44:44 +00:00
parent 81d6df0268
commit 6b186414de

View File

@ -5,15 +5,15 @@
}:
let
buildLua = callPackage ./buildLua.nix { };
unionOfDisjoints = lib.fold lib.attrsets.unionOfDisjoint {};
addTests = name: drv: let
addTests = name: drv:
if ! lib.isDerivation drv then
drv
else let
inherit (drv) scriptName;
scriptPath = "share/mpv/scripts/${scriptName}";
fullScriptPath = "${drv}/${scriptPath}";
in drv.overrideAttrs (old: { passthru = (old.passthru or {}) // { tests = unionOfDisjoints [
(old.passthru.tests or {})
@ -57,12 +57,13 @@ let
in
lib.recurseIntoAttrs
(lib.mapAttrs addTests ({
(lib.mapAttrs addTests (rec {
inherit (callPackage ./mpv.nix { inherit buildLua; })
acompressor autocrop autodeint autoload;
inherit (callPackage ./occivink.nix { inherit buildLua; })
blacklistExtensions seekTo;
buildLua = callPackage ./buildLua.nix { };
chapterskip = callPackage ./chapterskip.nix { inherit buildLua; };
convert = callPackage ./convert.nix { inherit buildLua; };
cutter = callPackage ./cutter.nix { inherit buildLua; };