about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2023-11-22 11:54:36 +0100
committerGitHub <noreply@github.com>2023-11-22 11:54:36 +0100
commitcb502b4d17fb2912444b0b6e9813f71ba2ebbfd9 (patch)
tree41eef9b056521a765f48eb2e26f05d181df5f40a /pkgs/applications/video/mpv
parente6fc0a2e3a969cbeb3eedde42d8453536fb62f74 (diff)
parent9a360a73c083476000b9a8c7a5b367aedffaf919 (diff)
downloadnixlib-cb502b4d17fb2912444b0b6e9813f71ba2ebbfd9.tar
nixlib-cb502b4d17fb2912444b0b6e9813f71ba2ebbfd9.tar.gz
nixlib-cb502b4d17fb2912444b0b6e9813f71ba2ebbfd9.tar.bz2
nixlib-cb502b4d17fb2912444b0b6e9813f71ba2ebbfd9.tar.lz
nixlib-cb502b4d17fb2912444b0b6e9813f71ba2ebbfd9.tar.xz
nixlib-cb502b4d17fb2912444b0b6e9813f71ba2ebbfd9.tar.zst
nixlib-cb502b4d17fb2912444b0b6e9813f71ba2ebbfd9.zip
Merge pull request #266487 from nbraud/mpvScripts/thumbfast
Diffstat (limited to 'pkgs/applications/video/mpv')
-rw-r--r--pkgs/applications/video/mpv/scripts/default.nix2
-rw-r--r--pkgs/applications/video/mpv/scripts/thumbfast.nix23
2 files changed, 7 insertions, 18 deletions
diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix
index f2fd9255a1c8..63f986c2c41a 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..0226074ca31b 100644
--- a/pkgs/applications/video/mpv/scripts/thumbfast.nix
+++ b/pkgs/applications/video/mpv/scripts/thumbfast.nix
@@ -1,14 +1,14 @@
-{ 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 {
     owner = "po5";
     repo = "thumbfast";
-    rev = "6f1d92da25a7b807427f55f085e7ad4d60c4e0d7";
-    hash = "sha256-7CCxMPmZZRDIcWn+YbV4xzZFL80qZS5UFA25E+Y2P2Q=";
+    rev = "4241c7daa444d3859b51b65a39d30e922adb87e9";
+    hash = "sha256-7EnFJVjEzqhWXAvhzURoOp/kad6WzwyidWxug6u8lVw=";
   };
 
   postPatch = ''
@@ -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";