depot/third_party/nixpkgs/pkgs/tools/misc/ytfzf/default.nix
Default email 42c9938f11 Project import generated by Copybara.
GitOrigin-RevId: dcdf30a78a523296b5f9d44fb67afac485b64737
2021-04-15 02:37:46 +02:00

51 lines
1,009 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, coreutils
, curl
, dmenu
, fzf
, gnused
, jq
, mpv
, ncurses
, ueberzug
, youtube-dl
}:
stdenv.mkDerivation rec {
pname = "ytfzf";
version = "1.1.3";
src = fetchFromGitHub {
owner = "pystardust";
repo = "ytfzf";
rev = "v${version}";
sha256 = "sha256-ST6ZSNJW4Pe8fdwRsQ0BLdCd3AE9OTG6is3J+HMdIzs=";
};
patches = [
# Updates have to be installed through Nix.
./no-update.patch
];
nativeBuildInputs = [ makeWrapper ];
makeFlags = [ "PREFIX=${placeholder "out"}/bin" ];
dontBuild = true;
postInstall = ''
wrapProgram "$out/bin/ytfzf" --prefix PATH : ${lib.makeBinPath [
coreutils curl dmenu fzf gnused jq mpv ncurses ueberzug 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 ];
};
}