nixpkgs/pkgs/tools/misc/ytfzf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.0 KiB
Nix
Raw Normal View History

2021-03-07 16:16:55 +00:00
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, coreutils
2021-03-07 16:16:55 +00:00
, curl
, dmenu
, fzf
, gnused
2021-03-07 16:16:55 +00:00
, jq
, mpv
, ueberzugpp
, yt-dlp
2021-03-07 16:16:55 +00:00
}:
stdenv.mkDerivation rec {
pname = "ytfzf";
version = "2.6.1";
2021-03-07 16:16:55 +00:00
src = fetchFromGitHub {
owner = "pystardust";
repo = "ytfzf";
rev = "v${version}";
hash = "sha256-wd7IgJRSh8UJ28slItIz1OhAg7cgVSDUldCyaObn6Ak=";
2021-03-07 16:16:55 +00:00
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installFlags = [
"PREFIX="
"DESTDIR=${placeholder "out"}"
"doc"
"addons"
];
2021-03-07 16:16:55 +00:00
postInstall = ''
wrapProgram "$out/bin/ytfzf" \
--prefix PATH : ${lib.makeBinPath [
coreutils curl dmenu fzf gnused jq mpv ueberzugpp 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;
2022-09-18 03:04:00 +00:00
platforms = platforms.all;
2021-03-07 16:16:55 +00:00
maintainers = with maintainers; [ dotlambda ];
2023-11-27 01:17:53 +00:00
mainProgram = "ytfzf";
2021-03-07 16:16:55 +00:00
};
}