aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/servers/news
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-12-21 06:05:12 +0100
committerMx Kookie <kookie@spacekookie.de>2020-12-21 06:05:12 +0100
commitf107be784e6d5da5f90735765a68fdff96acfbb4 (patch)
tree145573a598009fb6adbd5ef7fbce0a850681f5f0 /infra/libkookie/nixpkgs/pkgs/servers/news
parent2e04b35e5ac3a9123cafffbc84494fa4d389cca0 (diff)
parente9158eca70ae59e73fae23be5d13d3fa0cfc78b4 (diff)
Add 'infra/libkookie/nixpkgs/' from commit 'e9158eca70ae59e73fae23be5d13d3fa0cfc78b4'
git-subtree-dir: infra/libkookie/nixpkgs git-subtree-mainline: 2e04b35e5ac3a9123cafffbc84494fa4d389cca0 git-subtree-split: e9158eca70ae59e73fae23be5d13d3fa0cfc78b4
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/servers/news')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/servers/news/leafnode/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/servers/news/leafnode/default.nix b/infra/libkookie/nixpkgs/pkgs/servers/news/leafnode/default.nix
new file mode 100644
index 000000000000..4095b95ad96e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/servers/news/leafnode/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, pcre }:
+
+stdenv.mkDerivation {
+ 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" ];
+
+ prePatch = ''
+ substituteInPlace Makefile.in --replace 02770 0770
+ '';
+
+ preConfigure = ''
+ # configure uses id to check environment; we don't want this check
+ sed -re 's/^ID[=].*/ID="echo whatever"/' -i configure
+ '';
+
+ 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 = "Implementation of a store & forward NNTP proxy";
+ license = stdenv.lib.licenses.mit;
+ platforms = stdenv.lib.platforms.unix;
+ };
+}