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

52 lines
1009 B
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
, ncurses
, ueberzug
2021-03-07 16:16:55 +00:00
, youtube-dl
}:
stdenv.mkDerivation rec {
pname = "ytfzf";
version = "1.2.0";
2021-03-07 16:16:55 +00:00
src = fetchFromGitHub {
owner = "pystardust";
repo = "ytfzf";
rev = "v${version}";
sha256 = "sha256-3wbjCtRmnd9tm8kqKaIF6VmMdKsWznhOvQkEsrAJpAE=";
2021-03-07 16:16:55 +00:00
};
patches = [
# Updates have to be installed through Nix.
./no-update.patch
];
2021-03-07 16:16:55 +00:00
nativeBuildInputs = [ makeWrapper ];
2021-03-09 15:12:12 +00:00
makeFlags = [ "PREFIX=${placeholder "out"}/bin" ];
2021-03-07 16:16:55 +00:00
dontBuild = true;
postInstall = ''
wrapProgram "$out/bin/ytfzf" --prefix PATH : ${lib.makeBinPath [
coreutils curl dmenu fzf gnused jq mpv ncurses ueberzug youtube-dl
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;
maintainers = with maintainers; [ dotlambda ];
};
}