@@ -1,61 +0,0 @@
1−{ stdenv, fetchurl, sqlite, curl, pkgconfig, libxml2, stfl, json-c-0-11, ncurses
2−, gettext, libiconv, makeWrapper, perl, fetchpatch }:
3−
4−stdenv.mkDerivation rec {
5− name = "newsbeuter-2.9";
6−
7− src = fetchurl {
8− url = "http://www.newsbeuter.org/downloads/${name}.tar.gz";
9− sha256 = "1j1x0hgwxz11dckk81ncalgylj5y5fgw5bcmp9qb5hq9kc0vza3l";
10−
11− };
12−
13− buildInputs
14− # use gettext instead of libintlOrEmpty so we have access to the msgfmt
15− # command
16− = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl libiconv ]
17− ++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
18−
19− preBuild = ''
20− sed -i -e 110,114d config.sh
21− sed -i "1 s%^.*$%#!${perl}/bin/perl%" txt2h.pl
22− export LDFLAGS=-lncursesw
23− '';
24−
25− patches = [
26− (fetchpatch {
27− url = "https://github.com/akrennmair/newsbeuter/commit/cdacfbde9fe3ae2489fc96d35dfb7d263ab03f50.patch";
28− sha256 = "1lhvn63cqjpikwsr6zzndb1p5y140vvphlg85fazwx4xpzd856d9";
29− })
30− (fetchpatch {
31− url = "https://github.com/akrennmair/newsbeuter/commit/33577f842d9b74c119f3cebda95ef8652304db81.patch";
32− sha256 = "1kwhp6k14gk1hclgsr9w47qg7hs60p23zsl6f6vw13mczp2naqlb";
33− })
34− # https://github.com/akrennmair/newsbeuter/issues/598 / CVE-2017-14500
35− (fetchpatch {
36− url = "https://github.com/akrennmair/newsbeuter/commit/26f5a4350f3ab5507bb8727051c87bb04660f333.patch";
37− sha256 = "1jjxj4z3s4f1n8rfpwyd42a40gjnziykqas6a26s1lsdkklnbp6q";
38− })
39− # https://github.com/akrennmair/newsbeuter/issues/591 / CVE-2017-12904
40− (fetchpatch {
41− url = "https://github.com/akrennmair/newsbeuter/commit/d1460189f6f810ca9a3687af7bc43feb7f2af2d9.patch";
42− sha256 = "1a8k73ckziszsbdwdhcmkfvlmgy955gssg9v4sqvg20v91l5rmai";
43− })
44− ];
45−
46− installFlags = [ "DESTDIR=$(out)" "prefix=" ];
47−
48− postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
49− for prog in $out/bin/*; do
50− wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib"
51− done
52− '';
53−
54− meta = {
55− homepage = http://www.newsbeuter.org;
56− description = "An open-source RSS/Atom feed reader for text terminals";
57− maintainers = with stdenv.lib.maintainers; [ lovek323 ];
58− license = stdenv.lib.licenses.mit;
59− platforms = stdenv.lib.platforms.unix;
60− };
61−}