Commit 1886553e authored by Martin Weinelt's avatar Martin Weinelt Committed by github-actions[bot]
Browse files

miniflux: fix http user agent regression

Miniflux in 2.0.5.0 introduced a regression in its HTTP client, where
the global user-agent would fall back to that of the generic Go library
it uses.

This user agent is banned/rate-limited on many pages, which causes feed
refreshes to be greeted by e.g. HTTP/403.

(cherry picked from commit 95469bd3)
parent 81e35cc8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
{ lib, buildGo121Module, fetchFromGitHub, installShellFiles, nixosTests }:
{ lib, buildGo121Module, fetchFromGitHub, fetchpatch, installShellFiles, nixosTests }:

let
  pname = "miniflux";
@@ -14,6 +14,15 @@ in buildGo121Module {
    sha256 = "sha256-+oNF/Zwc1Z/cu3SQC/ZTekAW5Qef9RKrdszunLomGII=";
  };

  patches = [
    (fetchpatch {
      # https://github.com/miniflux/v2/pull/2193, remove after 2.0.50
      name = "miniflux-user-agent-regression.patch";
      url = "https://github.com/miniflux/v2/commit/7a03291442a4e35572c73a2fcfe809fa8e03063e.patch";
      hash = "sha256-tJ1l5rqD0x0xtQs+tDwpFHOY+7k6X02bkwVJo6RAdb8=";
    })
  ];

  vendorHash = "sha256-jLyjQ+w/QS9uA0pGWF2X6dEfOifcI2gC2sgi1STEzpU=";

  nativeBuildInputs = [ installShellFiles ];