From 8fb3efeb82018c82cef659db0c0d6b0ece68de48 Mon Sep 17 00:00:00 2001 From: NullBite Date: Fri, 20 Sep 2024 06:50:13 +0200 Subject: [PATCH] pkgs: update redlib --- pkgs/redlib/auth-fix.patch | 30 ------------------------------ pkgs/redlib/default.nix | 11 ++++++----- 2 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 pkgs/redlib/auth-fix.patch diff --git a/pkgs/redlib/auth-fix.patch b/pkgs/redlib/auth-fix.patch deleted file mode 100644 index 016300a..0000000 --- a/pkgs/redlib/auth-fix.patch +++ /dev/null @@ -1,30 +0,0 @@ -From bd47c206a1d94c8382570b69730d72562d777454 Mon Sep 17 00:00:00 2001 -From: Matthew Esposito -Date: Thu, 30 May 2024 18:08:45 -0400 -Subject: [PATCH] fix(oauth): Make Android user-agent patching unconditional - ---- - src/client.rs | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/client.rs b/src/client.rs -index 5b8fe8f..5ea9d1c 100644 ---- a/src/client.rs -+++ b/src/client.rs -@@ -181,11 +181,12 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo - ) - }; - -- // Check if multi sub requested, or if submitted was requested. If so, replace "Android" with a tricky word. -+ // Replace "Android" with a tricky word. - // Issues: #78/#115, #116 -- if path.contains('+') || path.contains("/submitted") { -- user_agent = user_agent.replace("Android", "Andr\u{200B}oid"); -- } -+ // If you include the word "Android", you will get a number of different errors -+ // I guess they don't expect mobile traffic on the endpoints we use -+ // Scrawled on wall for next poor soul: Run the test suite. -+ user_agent = user_agent.replace("Android", "Andr\u{200B}oid"); - - // Build request to Reddit. When making a GET, request gzip compression. - // (Reddit doesn't do brotli yet.) diff --git a/pkgs/redlib/default.nix b/pkgs/redlib/default.nix index 393b781..fc00b6c 100644 --- a/pkgs/redlib/default.nix +++ b/pkgs/redlib/default.nix @@ -8,20 +8,20 @@ }: rustPlatform.buildRustPackage rec { pname = "redlib"; - version = "0.34.0"; + version = "0.35.1"; src = fetchFromGitHub { owner = "redlib-org"; repo = "redlib"; - rev = "refs/tags/v${version}"; - hash = "sha256-JpuCX2ae9me+zHxQj5jqQlgDci2NV+TEVUAqnuTn3cA="; + # rev = "refs/tags/v${version}"; + rev = "793047f63f0f603e342c919bbfc469c7569276fa"; + hash = "sha256-A6t/AdKP3fCEyIo8fTIirZAlZPfyS8ba3Pejp8J6AUQ="; }; patches = [ - ./auth-fix.patch ]; - cargoHash = "sha256-gkRblCHUFiprZeYtu43GIGBZqCq5l/HEGaQN91XbfSs="; + cargoHash = "sha256-rJXKH9z8DC+7qqawbnSkYoQby6hBLLM6in239Wc8rvk="; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security @@ -30,6 +30,7 @@ rustPlatform.buildRustPackage rec { checkFlags = [ # All these test try to connect to Reddit. "--skip=test_fetching_subreddit_quarantined" + "--skip=test_gated_and_quarantined" "--skip=test_fetching_nsfw_subreddit" "--skip=test_fetching_ws"