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
|
2023-05-24 13:37:59 +00:00
|
|
|
, ueberzugpp
|
2022-01-03 16:56:52 +00:00
|
|
|
, yt-dlp
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ytfzf";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.6.2";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pystardust";
|
|
|
|
repo = "ytfzf";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-rwCVOdu9UfTArISt8ITQtLU4Gj2EZd07bcFKvxXQ7Bc=";
|
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 [
|
2023-05-24 13:37:59 +00:00
|
|
|
coreutils curl dmenu fzf gnused jq mpv ueberzugpp 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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Posix script to find and watch youtube videos from the terminal";
|
2021-03-09 03:18:52 +00:00
|
|
|
homepage = "https://github.com/pystardust/ytfzf";
|
|
|
|
license = licenses.gpl3Only;
|
2022-09-22 12:36:57 +00:00
|
|
|
platforms = platforms.all;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "ytfzf";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
}
|