From 8ee52f38565702ef74c3250135d18b992659532c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 15 Apr 2014 02:54:58 -0500 Subject: [PATCH] Add leafnode for unix systems --- pkgs/servers/news/leafnode/default.nix | 28 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/servers/news/leafnode/default.nix diff --git a/pkgs/servers/news/leafnode/default.nix b/pkgs/servers/news/leafnode/default.nix new file mode 100644 index 000000000000..9da83fe891fe --- /dev/null +++ b/pkgs/servers/news/leafnode/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, pcre }: + +stdenv.mkDerivation rec { + name = "leafnode-2.0.0.alpha20121101a.12"; + + src = fetchurl { + url = "http://home.pages.de/~mandree/leafnode/beta/leafnode-2.0.0.alpha20121101a.tar.bz2"; + sha256 = "096w4gxj08m3vwmyv4sxpmbl8dn6mzqfmrhc32jgyca6qzlrdin8"; + }; + + configureFlags = "--enable-runas-user=nobody"; + + postConfigure = '' + # The is_validfqdn is far too restrictive, and only allows + # Internet-facing servers to run. In order to run leafnode via + # localhost only, we need to disable this check. + sed -i validatefqdn.c -e 's/int is_validfqdn(const char \*f) {/int is_validfqdn(const char *f) { return 1;/;' + ''; + + buildInputs = [ pcre]; + + meta = { + homepage = "http://leafnode.sourceforge.net/"; + description = "Leafnode implements a store & forward NNTP proxy"; + license = "X11"; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b062a1a3a1fc..743d699ee876 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6443,6 +6443,8 @@ let joseki = callPackage ../servers/http/joseki {}; + leafnode = callPackage ../servers/news/leafnode { }; + lighttpd = callPackage ../servers/http/lighttpd { }; mailman = callPackage ../servers/mail/mailman { };