2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
2021-03-15 08:37:03 +00:00
|
|
|
, coreutils
|
2021-03-09 03:18:52 +00:00
|
|
|
, curl
|
|
|
|
, dmenu
|
|
|
|
, fzf
|
2021-03-15 08:37:03 +00:00
|
|
|
, gnused
|
2021-03-09 03:18:52 +00:00
|
|
|
, jq
|
|
|
|
, mpv
|
2021-03-15 08:37:03 +00:00
|
|
|
, ueberzug
|
2022-01-03 16:56:52 +00:00
|
|
|
, yt-dlp
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ytfzf";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.4.1";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pystardust";
|
|
|
|
repo = "ytfzf";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-nci2VXto9LptfNHBmLGxfMXQnzbVP1+GlvllOqWFGKU=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
installFlags = [
|
|
|
|
"PREFIX="
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
|
|
|
"doc"
|
|
|
|
"addons"
|
|
|
|
];
|
2022-01-25 03:21:06 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
postInstall = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
wrapProgram "$out/bin/ytfzf" \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [
|
2022-07-14 12:49:19 +00:00
|
|
|
coreutils curl dmenu fzf gnused jq mpv ueberzug yt-dlp
|
2022-04-27 09:35:20 +00:00
|
|
|
]} \
|
|
|
|
--set YTFZF_SYSTEM_ADDON_DIR "$out/share/ytfzf/addons"
|
2021-03-09 03:18:52 +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 ];
|
|
|
|
};
|
|
|
|
}
|