9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
38 lines
951 B
Nix
38 lines
951 B
Nix
{ lib, stdenvNoCC, fetchFromGitHub, mpv-unwrapped }:
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
name = "mpv-thumbfast";
|
|
version = "unstable-2023-06-04";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "po5";
|
|
repo = "thumbfast";
|
|
rev = "6f1d92da25a7b807427f55f085e7ad4d60c4e0d7";
|
|
hash = "sha256-7CCxMPmZZRDIcWn+YbV4xzZFL80qZS5UFA25E+Y2P2Q=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace thumbfast.lua \
|
|
--replace 'mpv_path = "mpv"' 'mpv_path = "${lib.getBin mpv-unwrapped}/bin/mpv"'
|
|
'';
|
|
|
|
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";
|
|
|
|
meta = {
|
|
description = "High-performance on-the-fly thumbnailer for mpv";
|
|
homepage = "https://github.com/po5/thumbfast";
|
|
license = lib.licenses.mpl20;
|
|
maintainers = with lib.maintainers; [ apfelkuchen6 ];
|
|
};
|
|
}
|