IRC Bot package #83

Closed
max wants to merge 16 commits from pkg-ircbot into master
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 43d852f11d - Show all commits

View file

@ -0,0 +1,5 @@
{
"server": "127.0.0.1",
"port": 6668,
"tls": false
}

View file

@ -4,6 +4,7 @@ let
python = pkgs.python3; python = pkgs.python3;
procfile = pkgs.writeText "Procfile" '' procfile = pkgs.writeText "Procfile" ''
ircd: ${pkgs.ngircd}/bin/ngircd --config ${ircdConfig} --nodaemon ircd: ${pkgs.ngircd}/bin/ngircd --config ${ircdConfig} --nodaemon
bot: ${python.interpreter} main.py
''; '';
ircdConfig = pkgs.writeText "ngircd.conf" '' ircdConfig = pkgs.writeText "ngircd.conf" ''
@ -29,6 +30,12 @@ let
Name = op Name = op
Password = op Password = op
''; '';
botConfig = pkgs.writeText "ircbot-config.json" (builtins.toJSON {
server = "127.0.0.1";
port = 6668;
tls = false;
});
in in
{ {
projectShells.ircbot = { projectShells.ircbot = {
@ -45,6 +52,7 @@ in
tools = [ tools = [
python python
]; ];
env.IRCBOT_CONFIG.value = botConfig;
}; };
packages.ircbot = with pkgs; stdenvNoCC.mkDerivation { packages.ircbot = with pkgs; stdenvNoCC.mkDerivation {
pname = "ircbot"; pname = "ircbot";