2014-03-13 18:15:28 +01:00
|
|
|
{ stdenv, fetchurl, sqlite, curl, pkgconfig, libxml2, stfl, json-c-0-11, ncurses
|
2016-01-14 05:54:11 +01:00
|
|
|
, gettext, libiconv, makeWrapper, perl, fetchpatch }:
|
2013-06-02 08:27:00 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-05-05 14:06:47 +02:00
|
|
|
name = "newsbeuter-2.9";
|
2013-06-02 08:27:00 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.newsbeuter.org/downloads/${name}.tar.gz";
|
2015-05-05 14:06:47 +02:00
|
|
|
sha256 = "1j1x0hgwxz11dckk81ncalgylj5y5fgw5bcmp9qb5hq9kc0vza3l";
|
2014-03-13 18:15:28 +01:00
|
|
|
|
2013-06-02 08:27:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs
|
|
|
|
# use gettext instead of libintlOrEmpty so we have access to the msgfmt
|
|
|
|
# command
|
2014-11-27 00:16:50 +01:00
|
|
|
= [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl libiconv ]
|
2013-06-02 08:27:00 +02:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
|
|
|
|
|
|
|
|
preBuild = ''
|
2014-03-13 18:15:28 +01:00
|
|
|
sed -i -e 110,114d config.sh
|
2013-07-04 04:06:39 +02:00
|
|
|
sed -i "1 s%^.*$%#!${perl}/bin/perl%" txt2h.pl
|
2013-06-02 08:27:00 +02:00
|
|
|
export LDFLAGS=-lncursesw
|
|
|
|
'';
|
|
|
|
|
2016-01-14 05:54:11 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/akrennmair/newsbeuter/commit/cdacfbde9fe3ae2489fc96d35dfb7d263ab03f50.patch";
|
|
|
|
sha256 = "1lhvn63cqjpikwsr6zzndb1p5y140vvphlg85fazwx4xpzd856d9";
|
|
|
|
})
|
2017-01-20 02:08:25 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/akrennmair/newsbeuter/commit/33577f842d9b74c119f3cebda95ef8652304db81.patch";
|
|
|
|
sha256 = "1kwhp6k14gk1hclgsr9w47qg7hs60p23zsl6f6vw13mczp2naqlb";
|
|
|
|
})
|
2016-01-14 05:54:11 +01:00
|
|
|
];
|
|
|
|
|
2015-05-05 14:06:47 +02:00
|
|
|
installFlags = [ "DESTDIR=$(out)" "prefix=" ];
|
|
|
|
|
2017-01-20 02:09:16 +01:00
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
2015-05-05 14:06:47 +02:00
|
|
|
for prog in $out/bin/*; do
|
|
|
|
wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib"
|
|
|
|
done
|
|
|
|
'';
|
2013-06-02 08:27:00 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.newsbeuter.org;
|
|
|
|
description = "An open-source RSS/Atom feed reader for text terminals";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
|
|
|
license = stdenv.lib.licenses.mit;
|
2017-01-20 02:09:16 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2013-06-02 08:27:00 +02:00
|
|
|
};
|
|
|
|
}
|