about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv
diff options
context:
space:
mode:
authornicoo <nicoo@mur.at>2023-10-18 09:07:29 +0000
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-11-11 14:05:39 -0300
commit580fc8a960816d4f3feab9492aadbad617f0a1fb (patch)
treeea6cd07b816347ee4b8ffc702e2909059887b444 /pkgs/applications/video/mpv
parentd947be887fd3f8748a47398e1c885d5f3ffa423e (diff)
downloadnixlib-580fc8a960816d4f3feab9492aadbad617f0a1fb.tar
nixlib-580fc8a960816d4f3feab9492aadbad617f0a1fb.tar.gz
nixlib-580fc8a960816d4f3feab9492aadbad617f0a1fb.tar.bz2
nixlib-580fc8a960816d4f3feab9492aadbad617f0a1fb.tar.lz
nixlib-580fc8a960816d4f3feab9492aadbad617f0a1fb.tar.xz
nixlib-580fc8a960816d4f3feab9492aadbad617f0a1fb.tar.zst
nixlib-580fc8a960816d4f3feab9492aadbad617f0a1fb.zip
mpvScripts.thumbnail: Refactor with buildLua
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/thumbnail.nix19
2 files changed, 6 insertions, 15 deletions
diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix
index 9fde30d23ac2..94c59fa8b068 100644
--- a/pkgs/applications/video/mpv/scripts/default.nix
+++ b/pkgs/applications/video/mpv/scripts/default.nix
@@ -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 { };
diff --git a/pkgs/applications/video/mpv/scripts/thumbnail.nix b/pkgs/applications/video/mpv/scripts/thumbnail.nix
index 291db71dc75f..29509bd033f3 100644
--- a/pkgs/applications/video/mpv/scripts/thumbnail.nix
+++ b/pkgs/applications/video/mpv/scripts/thumbnail.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";