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