From 4cd8e98f48e5a13b71a02bd1c480f54e60f0a3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 30 Dec 2021 08:22:09 +0000 Subject: [PATCH] ytfzf: 1.2.0 -> 2.0 https://github.com/pystardust/ytfzf/releases/tag/v2.0 --- pkgs/tools/misc/ytfzf/default.nix | 20 +++++++++--------- pkgs/tools/misc/ytfzf/no-update.patch | 29 --------------------------- 2 files changed, 10 insertions(+), 39 deletions(-) delete mode 100644 pkgs/tools/misc/ytfzf/no-update.patch diff --git a/pkgs/tools/misc/ytfzf/default.nix b/pkgs/tools/misc/ytfzf/default.nix index a35e9200a71d..95b4a8907230 100644 --- a/pkgs/tools/misc/ytfzf/default.nix +++ b/pkgs/tools/misc/ytfzf/default.nix @@ -2,6 +2,7 @@ , stdenv , fetchFromGitHub , makeWrapper +, chafa , coreutils , curl , dmenu @@ -9,27 +10,21 @@ , gnused , jq , mpv -, ncurses , ueberzug -, youtube-dl +, yt-dlp }: stdenv.mkDerivation rec { pname = "ytfzf"; - version = "1.2.0"; + version = "2.0"; src = fetchFromGitHub { owner = "pystardust"; repo = "ytfzf"; rev = "v${version}"; - sha256 = "sha256-3wbjCtRmnd9tm8kqKaIF6VmMdKsWznhOvQkEsrAJpAE="; + sha256 = "sha256-JuLfFC3oz2FvCaD+XPuL1N8tGKmv4atyZIBeDKWYgT8="; }; - patches = [ - # Updates have to be installed through Nix. - ./no-update.patch - ]; - nativeBuildInputs = [ makeWrapper ]; makeFlags = [ "PREFIX=${placeholder "out"}/bin" ]; @@ -38,8 +33,13 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram "$out/bin/ytfzf" --prefix PATH : ${lib.makeBinPath [ - coreutils curl dmenu fzf gnused jq mpv ncurses ueberzug youtube-dl + chafa coreutils curl dmenu fzf gnused jq mpv ueberzug yt-dlp ]} + + gzip -c docs/man/ytfzf.1 > docs/man/ytfzf.1.gz + gzip -c docs/man/ytfzf.5 > docs/man/ytfzf.5.gz + install -Dt "$out/share/man/man1" docs/man/ytfzf.1.gz + install -Dt "$out/share/man/man5" docs/man/ytfzf.5.gz ''; meta = with lib; { diff --git a/pkgs/tools/misc/ytfzf/no-update.patch b/pkgs/tools/misc/ytfzf/no-update.patch deleted file mode 100644 index e71582f6364f..000000000000 --- a/pkgs/tools/misc/ytfzf/no-update.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/ytfzf b/ytfzf -index f4d2e0d..7a3b4b6 100755 ---- a/ytfzf -+++ b/ytfzf -@@ -1260,22 +1260,8 @@ EOF - } - - update_ytfzf () { -- branch="$1" -- updatefile="/tmp/ytfzf-update" -- curl -L "https://raw.githubusercontent.com/pystardust/ytfzf/$branch/ytfzf" -o "$updatefile" -- -- if sed -n '1p' < "$updatefile" | grep -q '#!/bin/sh'; then -- chmod 755 "$updatefile" -- [ "$(uname)" = "Darwin" ] && prefix="/usr/local/bin" || prefix="/usr/bin" -- function_exists "sudo" && doasroot="sudo" || doasroot="doas" -- $doasroot cp "$updatefile" "$prefix/ytfzf" -- unset prefix doasroot -- else -- printf "%bFailed to update ytfzf. Try again later.%b" "$c_red" "$c_reset" -- fi -- -- rm "$updatefile" -- exit 0 -+ printf "%bUpdates have to be installed through Nix.%b\n" "$c_red" "$c_reset" -+ exit 1 - } - - #gives a value to sort by (this will give the unix time the video was uploaded)