nixpkgs/pkgs/tools/misc/ytfzf/default.nix
2023-01-18 14:33:13 -08:00

54 lines
1.0 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, coreutils
, curl
, dmenu
, fzf
, gnused
, jq
, mpv
, ueberzug
, yt-dlp
}:
stdenv.mkDerivation rec {
pname = "ytfzf";
version = "2.5.4";
src = fetchFromGitHub {
owner = "pystardust";
repo = "ytfzf";
rev = "v${version}";
hash = "sha256-AouOckRrPdIzwfn6s7GXu3U9PrihcyPpt6Xb41dq1zg=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installFlags = [
"PREFIX="
"DESTDIR=${placeholder "out"}"
"doc"
"addons"
];
postInstall = ''
wrapProgram "$out/bin/ytfzf" \
--prefix PATH : ${lib.makeBinPath [
coreutils curl dmenu fzf gnused jq mpv ueberzug yt-dlp
]} \
--set YTFZF_SYSTEM_ADDON_DIR "$out/share/ytfzf/addons"
'';
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;
platforms = platforms.all;
maintainers = with maintainers; [ dotlambda ];
};
}