summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-05-20 11:08:58 +0200
committertv <tv@krebsco.de>2021-05-20 11:08:58 +0200
commit5460255668f43ad1486c6ce0261aebe06d64857a (patch)
tree75e4f4b71c5636bb405b9ddbb30fdbeeffb4eced /krebs/5pkgs/simple
parenta5d9c02a937f577c0dc25b8e46142f9c9b1db534 (diff)
parentda975042c505a2fa693677cbd10d8245c17b3570 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/5pkgs/simple')
-rw-r--r--krebs/5pkgs/simple/solanum/bandb.patch12
-rw-r--r--krebs/5pkgs/simple/solanum/default.nix63
-rw-r--r--krebs/5pkgs/simple/solanum/dont-create-logdir.patch14
3 files changed, 89 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/solanum/bandb.patch b/krebs/5pkgs/simple/solanum/bandb.patch
new file mode 100644
index 000000000..7d204398b
--- /dev/null
+++ b/krebs/5pkgs/simple/solanum/bandb.patch
@@ -0,0 +1,12 @@
+diff --git a/ircd/bandbi.c b/ircd/bandbi.c
+index 29a3bfa2..16a40f17 100644
+--- a/ircd/bandbi.c
++++ b/ircd/bandbi.c
+@@ -83,7 +83,6 @@ start_bandb(void)
+ const char *suffix = "";
+ #endif
+
+- rb_setenv("BANDB_DBPATH", ircd_paths[IRCD_PATH_BANDB], 1);
+ if(bandb_path == NULL)
+ {
+ snprintf(fullpath, sizeof(fullpath), "%s%cbandb%s", ircd_paths[IRCD_PATH_LIBEXEC], RB_PATH_SEPARATOR, suffix);
diff --git a/krebs/5pkgs/simple/solanum/default.nix b/krebs/5pkgs/simple/solanum/default.nix
new file mode 100644
index 000000000..279cccbcc
--- /dev/null
+++ b/krebs/5pkgs/simple/solanum/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, bison
+, flex
+, openssl
+, sqlite
+, lksctp-tools
+}:
+
+stdenv.mkDerivation rec {
+ pname = "solanum";
+ version = "unstable-2021-04-27";
+
+ src = fetchFromGitHub {
+ owner = "solanum-ircd";
+ repo = pname;
+ rev = "3ff5a12e75662e9a642f2a4364797bd361eb0925";
+ sha256 = "14ywmfdv8cncbyg08y2qdis00kwg8lvhkcgj185is67smh0qf88f";
+ };
+
+ patches = [
+ ./dont-create-logdir.patch
+ ./bandb.patch # https://github.com/solanum-ircd/solanum/issues/156
+ ];
+
+ configureFlags = [
+ "--enable-epoll"
+ "--enable-ipv6"
+ "--enable-openssl=${openssl.dev}"
+ "--with-program-prefix=solanum-"
+ "--localstatedir=/var/lib"
+ "--with-rundir=/run"
+ "--with-logdir=/var/log"
+ ] ++ lib.optionals (stdenv.isLinux) [
+ "--enable-sctp=${lksctp-tools.out}/lib"
+ ];
+
+ nativeBuildInputs = [
+ autoreconfHook
+ bison
+ flex
+ pkg-config
+ ];
+
+ buildInputs = [
+ openssl
+ sqlite
+ ];
+
+ doCheck = !stdenv.isDarwin;
+
+ enableParallelBuilding = true;
+
+ meta = with lib; {
+ description = "An IRCd for unified networks";
+ homepage = "https://github.com/solanum-ircd/solanum";
+ license = licenses.gpl2Only;
+ maintainers = with maintainers; [ hexa ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/krebs/5pkgs/simple/solanum/dont-create-logdir.patch b/krebs/5pkgs/simple/solanum/dont-create-logdir.patch
new file mode 100644
index 000000000..e348dd7b8
--- /dev/null
+++ b/krebs/5pkgs/simple/solanum/dont-create-logdir.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile.am b/Makefile.am
+index 19e7b396..21093521 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -35,9 +35,6 @@ include/serno.h:
+ echo '#define DATECODE 0UL' >>include/serno.h; \
+ fi
+
+-install-data-hook:
+- test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}
+-
+ install-exec-hook:
+ rm -f ${DESTDIR}${libdir}/*.la
+ rm -f ${DESTDIR}${moduledir}/*.la