depot/third_party/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix
Default email 1be0098156 Project import generated by Copybara.
GitOrigin-RevId: 667e5581d16745bcda791300ae7e2d73f49fff25
2022-11-04 13:27:35 +01:00

36 lines
958 B
Nix

{ lib, stdenvNoCC, fetchFromGitHub, python3 }:
stdenvNoCC.mkDerivation rec {
pname = "mpv-thumbnail-script";
version = "0.5.1";
src = fetchFromGitHub {
owner = "marzzzello";
repo = "mpv_thumbnail_script";
rev = version;
sha256 = "sha256-0nqV8vY3cBOJkLRoQ33Cc+4+vSK45i9yWbhKiQIuVSw=";
};
nativeBuildInputs = [ python3 ];
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";
meta = with lib; {
description = "A lua script to show preview thumbnails in mpv's OSC seekbar";
homepage = "https://github.com/marzzzello/mpv_thumbnail_script";
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ figsoda ];
};
}