Merge pull request #127016 from mweinelt/21.05/solanum

This commit is contained in:
Martin Weinelt 2021-06-16 12:18:53 +02:00 committed by GitHub
commit b8780177a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 19 deletions

View File

@ -2,7 +2,7 @@
let
inherit (lib) mkEnableOption mkIf mkOption types;
inherit (pkgs) solanum;
inherit (pkgs) solanum util-linux;
cfg = config.services.solanum;
configFile = pkgs.writeText "solanum.conf" cfg.config;
@ -78,15 +78,20 @@ in
config = mkIf cfg.enable (lib.mkMerge [
{
environment.etc."solanum/ircd.conf".source = configFile;
systemd.services.solanum = {
description = "Solanum IRC daemon";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = {
BANDB_DBPATH = "/var/lib/solanum/ban.db";
};
reloadIfChanged = true;
restartTriggers = [
configFile
];
serviceConfig = {
ExecStart = "${solanum}/bin/solanum -foreground -logfile /dev/stdout -configfile ${configFile} -pidfile /run/solanum/ircd.pid";
ExecStart = "${solanum}/bin/solanum -foreground -logfile /dev/stdout -configfile /etc/solanum/ircd.conf -pidfile /run/solanum/ircd.pid";
ExecReload = "${util-linux}/bin/kill -HUP $MAINPID";
DynamicUser = true;
User = "solanum";
StateDirectory = "solanum";

View File

@ -1,12 +0,0 @@
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);

View File

@ -23,7 +23,6 @@ stdenv.mkDerivation rec {
patches = [
./dont-create-logdir.patch
./bandb.patch # https://github.com/solanum-ircd/solanum/issues/156
];
postPatch = ''
@ -62,7 +61,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "An IRCd for unified networks";
homepage = "https://github.com/solanum-ircd/solanum";
license = licenses.gpl2Only;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ hexa ];
platforms = platforms.unix;
};