2021-03-07 16:16:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
2021-12-30 08:22:09 +00:00
|
|
|
, chafa
|
2021-03-14 18:41:58 +00:00
|
|
|
, coreutils
|
2021-03-07 16:16:55 +00:00
|
|
|
, curl
|
|
|
|
, dmenu
|
|
|
|
, fzf
|
2021-03-14 18:41:58 +00:00
|
|
|
, gnused
|
2021-03-07 16:16:55 +00:00
|
|
|
, jq
|
|
|
|
, mpv
|
2021-03-14 18:41:58 +00:00
|
|
|
, ueberzug
|
2021-12-30 08:22:09 +00:00
|
|
|
, yt-dlp
|
2021-03-07 16:16:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ytfzf";
|
2022-04-16 08:17:36 +00:00
|
|
|
version = "2.3";
|
2021-03-07 16:16:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pystardust";
|
|
|
|
repo = "ytfzf";
|
|
|
|
rev = "v${version}";
|
2022-04-16 08:17:36 +00:00
|
|
|
hash = "sha256-zfoICi1VChmrRHZ3dSHGTcXkVf/zirQTycFz98xj+QY=";
|
2021-03-07 16:16:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
2022-04-16 08:17:36 +00:00
|
|
|
installFlags = [
|
|
|
|
"PREFIX="
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
|
|
|
"doc"
|
|
|
|
"addons"
|
|
|
|
];
|
2022-01-22 01:26:55 +00:00
|
|
|
|
2021-03-07 16:16:55 +00:00
|
|
|
postInstall = ''
|
2022-04-16 08:17:36 +00:00
|
|
|
wrapProgram "$out/bin/ytfzf" \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [
|
|
|
|
chafa coreutils curl dmenu fzf gnused jq mpv ueberzug yt-dlp
|
|
|
|
]} \
|
|
|
|
--set YTFZF_SYSTEM_ADDON_DIR "$out/share/ytfzf/addons"
|
2021-03-07 16:16:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A posix script to find and watch youtube videos from the terminal";
|
|
|
|
homepage = "https://github.com/pystardust/ytfzf";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|