From 6fe976fde218948cd01014d1bf05dc2ec282428c Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 10 Mar 2021 14:23:24 -0500 Subject: [PATCH] mpvScripts.thumbnail: init at unstable-2020-01-16 --- .../video/mpv/scripts/thumbnail.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 37 insertions(+) create mode 100644 pkgs/applications/video/mpv/scripts/thumbnail.nix diff --git a/pkgs/applications/video/mpv/scripts/thumbnail.nix b/pkgs/applications/video/mpv/scripts/thumbnail.nix new file mode 100644 index 000000000000..cda15b2674c0 --- /dev/null +++ b/pkgs/applications/video/mpv/scripts/thumbnail.nix @@ -0,0 +1,36 @@ +{ fetchFromGitHub, lib, python3, stdenv }: + +stdenv.mkDerivation rec { + pname = "mpv_thumbnail_script"; + version = "unstable-2020-01-16"; + + src = fetchFromGitHub { + owner = "theamm"; + repo = pname; + rev = "682becf5b5115c2a206b4f0bdee413d4be8b5bef"; + sha256 = "0dgfrb8ypc5vlq35kzn423fm6l6348ivl85vb6j3ccc9a51xprw3"; + }; + + 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/theamm/mpv_thumbnail_script"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 237dca7c0b3e..5192e0deb1a7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24018,6 +24018,7 @@ in mpvacious = callPackage ../applications/video/mpv/scripts/mpvacious.nix {}; simple-mpv-webui = callPackage ../applications/video/mpv/scripts/simple-mpv-webui.nix {}; sponsorblock = callPackage ../applications/video/mpv/scripts/sponsorblock.nix {}; + thumbnail = callPackage ../applications/video/mpv/scripts/thumbnail.nix { }; }; mrpeach = callPackage ../applications/audio/pd-plugins/mrpeach { };