diff options
author | Robert Schütz <nix@dotlambda.de> | 2021-12-30 08:22:09 +0000 |
---|---|---|
committer | Robert Schütz <github@dotlambda.de> | 2021-12-30 23:54:50 +0000 |
commit | 4cd8e98f48e5a13b71a02bd1c480f54e60f0a3b7 (patch) | |
tree | 670ab72a428b4ffa6b7d4823a2cba713a2686f45 /pkgs/tools/misc/ytfzf | |
parent | 47e6b33a616764cfea2ad56c372b50a0d37bcdbc (diff) |
ytfzf: 1.2.0 -> 2.0
https://github.com/pystardust/ytfzf/releases/tag/v2.0
Diffstat (limited to 'pkgs/tools/misc/ytfzf')
-rw-r--r-- | pkgs/tools/misc/ytfzf/default.nix | 20 | ||||
-rw-r--r-- | pkgs/tools/misc/ytfzf/no-update.patch | 29 |
2 files changed, 10 insertions, 39 deletions
diff --git a/pkgs/tools/misc/ytfzf/default.nix b/pkgs/tools/misc/ytfzf/default.nix index a35e9200a71da..95b4a8907230b 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 e71582f6364f1..0000000000000 --- 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) |