about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/ytfzf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/ytfzf/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/ytfzf/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/ytfzf/default.nix b/nixpkgs/pkgs/tools/misc/ytfzf/default.nix
new file mode 100644
index 000000000000..6129fd4b9dad
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/ytfzf/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, coreutils
+, curl
+, dmenu
+, fzf
+, gnused
+, jq
+, mpv
+, ncurses
+, ueberzug
+, youtube-dl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ytfzf";
+  version = "1.1.2";
+
+  src = fetchFromGitHub {
+    owner = "pystardust";
+    repo = "ytfzf";
+    rev = "v${version}";
+    sha256 = "09az557479d3s1my46d2w86ndkvs2xi127kaw0csag0wlq2qq10p";
+  };
+
+  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 ];
+  };
+}