diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix new file mode 100644 index 000000000000..df98e7568684 --- /dev/null +++ b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchurl, sqlite, curl, pkgconfig, libxml2, stfl, json-c-0-11, ncurses +, gettext, libiconvOrEmpty, makeWrapper, perl }: + +stdenv.mkDerivation rec { + name = "newsbeuter-dev-20131103"; + + src = fetchurl { + url = "https://github.com/akrennmair/newsbeuter/archive/8abefa3efb5e6d70c32bac9e068248e98616d6ec.tar.gz"; + sha256 = "1pfkr4adm7rxwq44hpxwblw6gg8vd0frsi6szvhmzkpn5qmnpwpg"; + }; + + buildInputs + # use gettext instead of libintlOrEmpty so we have access to the msgfmt + # command + = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl ] + ++ libiconvOrEmpty + ++ stdenv.lib.optional stdenv.isDarwin makeWrapper; + + preBuild = '' + sed -i -e 104,108d config.sh + sed -i "1 s%^.*$%#!${perl}/bin/perl%" txt2h.pl + export LDFLAGS=-lncursesw + ''; + + NIX_CFLAGS_COMPILE = + "-I${libxml2}/include/libxml2 -I${json-c-0-11}/include/json-c"; + + NIX_LDFLAGS = "-lsqlite3 -lcurl -lxml2 -lstfl -ljson"; + + installPhase = '' + DESTDIR=$out prefix=\"\" make install + '' + stdenv.lib.optionalString stdenv.isDarwin '' + for prog in $out/bin/*; do + wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib" + done + ''; + + meta = with stdenv.lib; { + homepage = http://www.newsbeuter.org; + description = "An open-source RSS/Atom feed reader for text terminals"; + maintainers = with maintainers; [ lovek323 ]; + license = licenses.mit; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/libraries/json-c/0.11.nix b/pkgs/development/libraries/json-c/0.11.nix new file mode 100644 index 000000000000..029921ee08c0 --- /dev/null +++ b/pkgs/development/libraries/json-c/0.11.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "json-c-0.11"; + src = fetchurl { + url = "https://github.com/json-c/json-c/archive/json-c-0.11-20130402.tar.gz"; + sha256 = "1m8fy7lbahv1r7yqbhw4pl057sxmmgjihm1fsvc3h66710s2i24r"; + }; + meta = with stdenv.lib; { + description = "A JSON implementation in C"; + homepage = https://github.com/json-c/json-c/wiki; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; + + longDescription = '' + JSON-C implements a reference counting object model that allows you to + easily construct JSON objects in C, output them as JSON formatted strings + and parse JSON formatted strings back into the C representation of JSON + objects. + ''; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9a4a085ead35..e05f7647d2e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1409,6 +1409,8 @@ let newsbeuter = callPackage ../applications/networking/feedreaders/newsbeuter { }; + newsbeuter-dev = callPackage ../applications/networking/feedreaders/newsbeuter/dev.nix { }; + ngrok = callPackage ../tools/misc/ngrok { }; mpack = callPackage ../tools/networking/mpack { }; @@ -4574,7 +4576,9 @@ let json_glib = callPackage ../development/libraries/json-glib { }; - json_c = callPackage ../development/libraries/json-c { }; + json-c-0-9 = callPackage ../development/libraries/json-c { }; + json-c-0-11 = callPackage ../development/libraries/json-c/0.11.nix { }; + json_c = json-c-0-9; jsoncpp = callPackage ../development/libraries/jsoncpp { };