Commit 580fc8a9 authored by nicoo's avatar nicoo Committed by Anderson Torres
Browse files

mpvScripts.thumbnail: Refactor with buildLua

parent d947be88
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 { };
+5 −14
Original line number Diff line number Diff line
{ 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";