diff options
author | Robert Schütz <dev@schuetz-co.de> | 2021-06-26 11:18:02 +0200 |
---|---|---|
committer | Robert Schütz <dev@schuetz-co.de> | 2021-06-26 11:25:04 +0200 |
commit | ab1141d5f071bbc8c1e0d975613ab31576d7c1e4 (patch) | |
tree | a9d9d96041af4c383cf01f0eb1cd12de8d0592a5 /pkgs/tools/misc/ytfzf | |
parent | 6925f053c43cf36229dfef4f72585414d4c89432 (diff) |
ytfzf: 1.1.6 -> 1.2.0
https://github.com/pystardust/ytfzf/releases/tag/v1.2.0
Diffstat (limited to 'pkgs/tools/misc/ytfzf')
-rw-r--r-- | pkgs/tools/misc/ytfzf/default.nix | 4 | ||||
-rw-r--r-- | 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 302839a303873..a35e9200a71da 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 e023914083d81..e71582f6364f1 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) |