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

52 lines
1009 B
Nix
Raw Normal View History

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