2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, curl
|
|
|
|
, dmenu
|
|
|
|
, fzf
|
|
|
|
, jq
|
|
|
|
, mpv
|
|
|
|
, youtube-dl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ytfzf";
|
2021-03-12 07:09:13 +00:00
|
|
|
version = "1.0.1";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pystardust";
|
|
|
|
repo = "ytfzf";
|
|
|
|
rev = "v${version}";
|
2021-03-12 07:09:13 +00:00
|
|
|
sha256 = "1i9ya38zcaj1vkfgy1n4gp5vqb59zlrd609pdmz4jqinrb0c5fgv";
|
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 [
|
|
|
|
curl dmenu fzf jq mpv youtube-dl
|
|
|
|
]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|