Commit 1c80e334 authored by Robert Schütz's avatar Robert Schütz
Browse files
parent af776532
Loading
Loading
Loading
Loading
+3 −16
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
  stdenv,
  rustPlatform,
  fetchFromGitHub,
  fetchpatch,
  cargo,
  rustc,
  stfl,
@@ -22,32 +21,20 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "newsboat";
  version = "2.41";
  version = "2.42";

  src = fetchFromGitHub {
    owner = "newsboat";
    repo = "newsboat";
    tag = "r${finalAttrs.version}";
    hash = "sha256-LhEhbK66OYwAD/pel81N7Hgh/xEvnFR8GlZzgqZIe5M=";
    hash = "sha256-ZBqYxAX2jPaRycdw7BbhySt2uviICadT/5Z5WZqsqJM=";
  };

  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit (finalAttrs) pname version src;
    hash = "sha256-CyhyzNw2LXwIVf/SX2rQRvEex5LmjZfZKgCe88jthz0=";
    hash = "sha256-T6zBr3LoOkPLVkBvfhUdqs7iF2I6fRTZo+uMsrnv+5g=";
  };

  # fix macOS build
  patches = [
    (fetchpatch {
      url = "https://github.com/newsboat/newsboat/commit/4139a0ba1ec87e442ef1408823b07fc739742f9d.patch";
      hash = "sha256-zdtdpUQGATq/9w+hAY/Va9Ob95c8VT2D9aKFmAF+O0c=";
    })
    (fetchpatch {
      url = "https://github.com/newsboat/newsboat/commit/4eb748b6b6b63acddb3582e012442e519e8704ea.patch";
      hash = "sha256-A/0WbuMIapTsLoziUPr95ZctIr2hW7JOJSdMVaWayYI=";
    })
  ];

  # allow other ncurses versions on Darwin
  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
    substituteInPlace config.sh --replace-fail "ncurses5.4" "ncurses"