depot/third_party/nixpkgs/pkgs/tools/misc/ytfzf/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

54 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, coreutils
, curl
, dmenu
, fzf
, gnused
, jq
, mpv
, ueberzugpp
, yt-dlp
}:
stdenv.mkDerivation rec {
pname = "ytfzf";
version = "2.6.2";
src = fetchFromGitHub {
owner = "pystardust";
repo = "ytfzf";
rev = "v${version}";
hash = "sha256-rwCVOdu9UfTArISt8ITQtLU4Gj2EZd07bcFKvxXQ7Bc=";
};
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 ueberzugpp yt-dlp
]} \
--set YTFZF_SYSTEM_ADDON_DIR "$out/share/ytfzf/addons"
'';
meta = with lib; {
description = "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 ];
mainProgram = "ytfzf";
};
}