From 9d06a6c117a7cd5773a5581594f13d8a85fedaf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 7 Mar 2021 17:16:55 +0100 Subject: [PATCH] ytfzf: init at 1.0.0 --- pkgs/tools/misc/ytfzf/default.nix | 47 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/tools/misc/ytfzf/default.nix diff --git a/pkgs/tools/misc/ytfzf/default.nix b/pkgs/tools/misc/ytfzf/default.nix new file mode 100644 index 000000000000..bf64e858d2b7 --- /dev/null +++ b/pkgs/tools/misc/ytfzf/default.nix @@ -0,0 +1,47 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper +, curl +, dmenu +, fzf +, jq +, mpv +, youtube-dl +}: + +stdenv.mkDerivation rec { + pname = "ytfzf"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "pystardust"; + repo = "ytfzf"; + rev = "v${version}"; + sha256 = "09znixn8mpkxipv2x3nrfxr2i8g7y58v25qssqf092j9lh85sf9h"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + + dontBuild = true; + + # remove after next update + preInstall = '' + mkdir -p "$out/bin" + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5aee51d878ac..d84ec97d702e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9349,6 +9349,8 @@ in yeshup = callPackage ../tools/system/yeshup { }; + ytfzf = callPackage ../tools/misc/ytfzf { }; + ytree = callPackage ../tools/misc/ytree { }; yggdrasil = callPackage ../tools/networking/yggdrasil { };