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

52 lines
1,009 B
Nix
Raw Normal View History

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