mpvScripts.thumbfast: Refactor with buildLua

This commit is contained in:
nicoo 2023-10-18 08:34:17 +00:00
parent 61202fc867
commit d518566a30
2 changed files with 5 additions and 16 deletions

View file

@ -20,7 +20,7 @@ in lib.recurseIntoAttrs
quality-menu = callPackage ./quality-menu.nix { inherit buildLua; };
simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
sponsorblock = callPackage ./sponsorblock.nix { };
thumbfast = callPackage ./thumbfast.nix { };
thumbfast = callPackage ./thumbfast.nix { inherit buildLua; };
thumbnail = callPackage ./thumbnail.nix { inherit buildLua; };
uosc = callPackage ./uosc.nix { };
visualizer = callPackage ./visualizer.nix { };

View file

@ -1,7 +1,7 @@
{ lib, stdenvNoCC, fetchFromGitHub, mpv-unwrapped }:
{ lib, fetchFromGitHub, buildLua, mpv-unwrapped }:
stdenvNoCC.mkDerivation {
name = "mpv-thumbfast";
buildLua {
pname = "mpv-thumbfast";
version = "unstable-2023-06-04";
src = fetchFromGitHub {
@ -16,18 +16,7 @@ stdenvNoCC.mkDerivation {
--replace 'mpv_path = "mpv"' 'mpv_path = "${lib.getExe mpv-unwrapped}"'
'';
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/mpv/scripts
cp -r thumbfast.lua $out/share/mpv/scripts/thumbfast.lua
runHook postInstall
'';
passthru.scriptName = "thumbfast.lua";
scriptPath = "thumbfast.lua";
meta = {
description = "High-performance on-the-fly thumbnailer for mpv";