2022-09-29 17:14:03 +02:00
|
|
|
{ lib, stdenv, fetchurl, pcre, libxcrypt }:
|
2014-04-15 09:54:58 +02:00
|
|
|
|
2023-08-13 22:41:43 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-07-25 23:53:02 +02:00
|
|
|
pname = "leafnode";
|
2023-08-13 22:41:43 +02:00
|
|
|
version = "2.0.0.alpha20140727b";
|
2014-04-15 09:54:58 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-08-13 22:46:26 +02:00
|
|
|
url = "http://krusty.dt.e-technik.tu-dortmund.de/~ma/leafnode/beta/leafnode-${finalAttrs.version}.tar.bz2";
|
2023-08-13 22:41:43 +02:00
|
|
|
sha256 = "sha256-NOuiy7uHG3JMjV3UAtHDWK6yG6QmvrVljhVe0NdGEHU=";
|
2014-04-15 09:54:58 +02:00
|
|
|
};
|
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [ "--enable-runas-user=nobody" ];
|
2014-04-15 09:54:58 +02:00
|
|
|
|
2017-06-28 21:26:24 +02:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile.in --replace 02770 0770
|
|
|
|
'';
|
|
|
|
|
2023-08-13 22:41:43 +02:00
|
|
|
# configure uses id to check environment; we don't want this check
|
2014-09-04 22:45:55 +02:00
|
|
|
preConfigure = ''
|
|
|
|
sed -re 's/^ID[=].*/ID="echo whatever"/' -i configure
|
|
|
|
'';
|
|
|
|
|
2023-08-13 22:41:43 +02:00
|
|
|
# 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.
|
2014-04-15 09:54:58 +02:00
|
|
|
postConfigure = ''
|
2023-08-13 22:41:43 +02:00
|
|
|
sed -i validatefqdn.c -e 's/int is_validfqdn(const char \*f) {/int is_validfqdn(const char *f) { return 1;/;'
|
2014-04-15 09:54:58 +02:00
|
|
|
'';
|
|
|
|
|
2022-09-29 17:14:03 +02:00
|
|
|
buildInputs = [ pcre libxcrypt ];
|
2014-04-15 09:54:58 +02:00
|
|
|
|
|
|
|
meta = {
|
2023-08-13 22:41:43 +02:00
|
|
|
homepage = "https://leafnode.sourceforge.io/index.shtml";
|
|
|
|
description = "Implementation of a store & forward NNTP proxy, under development";
|
2021-01-15 08:07:56 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.unix;
|
2023-08-13 22:41:43 +02:00
|
|
|
maintainers = [ lib.maintainers.ne9z ];
|
2014-04-15 09:54:58 +02:00
|
|
|
};
|
2023-08-13 22:41:43 +02:00
|
|
|
})
|