From d518566a3076800978a2593c5f96cbf891983a26 Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 18 Oct 2023 08:34:17 +0000 Subject: [PATCH 1/2] mpvScripts.thumbfast: Refactor with `buildLua` --- .../video/mpv/scripts/default.nix | 2 +- .../video/mpv/scripts/thumbfast.nix | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index cdc641043f37..772194651748 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -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 { }; diff --git a/pkgs/applications/video/mpv/scripts/thumbfast.nix b/pkgs/applications/video/mpv/scripts/thumbfast.nix index 88209f049f6b..f7a692efb3bc 100644 --- a/pkgs/applications/video/mpv/scripts/thumbfast.nix +++ b/pkgs/applications/video/mpv/scripts/thumbfast.nix @@ -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"; From 9a360a73c083476000b9a8c7a5b367aedffaf919 Mon Sep 17 00:00:00 2001 From: nicoo Date: Thu, 9 Nov 2023 15:36:20 +0000 Subject: [PATCH 2/2] =?UTF-8?q?mpvScripts.thumbfast:=20unstable-2023-06-06?= =?UTF-8?q?=20=E2=86=92=202023-06-08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Includes a bugfix for `audio=no` case. --- pkgs/applications/video/mpv/scripts/thumbfast.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/mpv/scripts/thumbfast.nix b/pkgs/applications/video/mpv/scripts/thumbfast.nix index f7a692efb3bc..0226074ca31b 100644 --- a/pkgs/applications/video/mpv/scripts/thumbfast.nix +++ b/pkgs/applications/video/mpv/scripts/thumbfast.nix @@ -7,8 +7,8 @@ buildLua { src = fetchFromGitHub { owner = "po5"; repo = "thumbfast"; - rev = "6f1d92da25a7b807427f55f085e7ad4d60c4e0d7"; - hash = "sha256-7CCxMPmZZRDIcWn+YbV4xzZFL80qZS5UFA25E+Y2P2Q="; + rev = "4241c7daa444d3859b51b65a39d30e922adb87e9"; + hash = "sha256-7EnFJVjEzqhWXAvhzURoOp/kad6WzwyidWxug6u8lVw="; }; postPatch = ''