mpvScripts.thumbnail: Refactor with buildLua

This commit is contained in:
nicoo
2023-11-11 14:05:39 -03:00
committed by Anderson Torres
parent d947be887f
commit 580fc8a960
2 changed files with 6 additions and 15 deletions
@@ -21,7 +21,7 @@ in lib.recurseIntoAttrs
simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
sponsorblock = callPackage ./sponsorblock.nix { };
thumbfast = callPackage ./thumbfast.nix { };
thumbnail = callPackage ./thumbnail.nix { };
thumbnail = callPackage ./thumbnail.nix { inherit buildLua; };
uosc = callPackage ./uosc.nix { };
visualizer = callPackage ./visualizer.nix { };
vr-reversal = callPackage ./vr-reversal.nix { };
@@ -1,6 +1,6 @@
{ lib, stdenvNoCC, fetchFromGitHub, python3 }:
{ lib, buildLua, fetchFromGitHub, python3 }:
stdenvNoCC.mkDerivation rec {
buildLua rec {
pname = "mpv-thumbnail-script";
version = "0.5.3";
@@ -12,19 +12,10 @@ stdenvNoCC.mkDerivation rec {
};
nativeBuildInputs = [ python3 ];
postPatch = "patchShebangs concat_files.py";
dontBuild = false;
postPatch = ''
patchShebangs concat_files.py
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/mpv/scripts
cp mpv_thumbnail_script_{client_osc,server}.lua $out/share/mpv/scripts
runHook postInstall
'';
passthru.scriptName = "mpv_thumbnail_script_{client_osc,server}.lua";
scriptPath = "mpv_thumbnail_script_{client_osc,server}.lua";
meta = with lib; {
description = "A lua script to show preview thumbnails in mpv's OSC seekbar";