From ab1141d5f071bbc8c1e0d975613ab31576d7c1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 26 Jun 2021 11:18:02 +0200 Subject: [PATCH] ytfzf: 1.1.6 -> 1.2.0 https://github.com/pystardust/ytfzf/releases/tag/v1.2.0 --- pkgs/tools/misc/ytfzf/default.nix | 4 ++-- pkgs/tools/misc/ytfzf/no-update.patch | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/misc/ytfzf/default.nix b/pkgs/tools/misc/ytfzf/default.nix index 302839a30387..a35e9200a71d 100644 --- a/pkgs/tools/misc/ytfzf/default.nix +++ b/pkgs/tools/misc/ytfzf/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "ytfzf"; - version = "1.1.6"; + version = "1.2.0"; src = fetchFromGitHub { owner = "pystardust"; repo = "ytfzf"; rev = "v${version}"; - sha256 = "sha256-HXn/8Lrt6tNZWW1AeKMArOiW9t1v7MzlynSLryNdI5Y="; + sha256 = "sha256-3wbjCtRmnd9tm8kqKaIF6VmMdKsWznhOvQkEsrAJpAE="; }; patches = [ diff --git a/pkgs/tools/misc/ytfzf/no-update.patch b/pkgs/tools/misc/ytfzf/no-update.patch index e023914083d8..e71582f6364f 100644 --- a/pkgs/tools/misc/ytfzf/no-update.patch +++ b/pkgs/tools/misc/ytfzf/no-update.patch @@ -1,8 +1,8 @@ diff --git a/ytfzf b/ytfzf -index d5ff8c9..96f9c8f 100755 +index f4d2e0d..7a3b4b6 100755 --- a/ytfzf +++ b/ytfzf -@@ -934,23 +934,8 @@ send_notify () { +@@ -1260,22 +1260,8 @@ EOF } update_ytfzf () { @@ -12,19 +12,18 @@ index d5ff8c9..96f9c8f 100755 - - if sed -n '1p' < "$updatefile" | grep -q '#!/bin/sh'; then - chmod 755 "$updatefile" -- if [ "$(uname)" = "Darwin" ]; then -- sudo cp "$updatefile" "/usr/local/bin/ytfzf" -- else -- sudo cp "$updatefile" "/usr/bin/ytfzf" -- fi +- [ "$(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 +- exit 0 + printf "%bUpdates have to be installed through Nix.%b\n" "$c_red" "$c_reset" + exit 1 } - sort_video_data_date () { + #gives a value to sort by (this will give the unix time the video was uploaded)