l reaktor-coders: set env in hook

This commit is contained in:
lassulus 2019-01-28 23:07:23 +01:00
parent 1064023768
commit 32895b53c6

View File

@ -32,6 +32,7 @@ in {
pattern = ''@([^ ]+) (.*)$''; pattern = ''@([^ ]+) (.*)$'';
command = 1; command = 1;
arguments = [2]; arguments = [2];
env.HOME = config.krebs.reaktor2.coders.stateDir;
commands = let commands = let
lambdabot = (import (pkgs.fetchFromGitHub { lambdabot = (import (pkgs.fetchFromGitHub {
owner = "NixOS"; repo = "nixpkgs"; owner = "NixOS"; repo = "nixpkgs";
@ -46,37 +47,22 @@ in {
-e "$@" -e "$@"
''; '';
in { in {
pl = { pl.filename = pkgs.writeDash "lambdabot-pl" ''
env.HOME = config.krebs.reaktor2.coders.stateDir;
filename = pkgs.writeDash "lambdabot-pl" ''
${lambdabotWrapper} "@pl $1" ${lambdabotWrapper} "@pl $1"
''; '';
}; type.filename = pkgs.writeDash "lambdabot-type" ''
type = {
env.HOME = config.krebs.reaktor2.coders.stateDir;
filename = pkgs.writeDash "lambdabot-type" ''
${lambdabotWrapper} "@type $1" ${lambdabotWrapper} "@type $1"
''; '';
}; "let".filename = pkgs.writeDash "lambdabot-let" ''
"let" = {
env.HOME = config.krebs.reaktor2.coders.stateDir;
filename = pkgs.writeDash "lambdabot-let" ''
${lambdabotWrapper} "@let $1" ${lambdabotWrapper} "@let $1"
''; '';
}; run.filename = pkgs.writeDash "lambdabot-run" ''
run = {
env.HOME = config.krebs.reaktor2.coders.stateDir;
filename = pkgs.writeDash "lambdabot-run" ''
${lambdabotWrapper} "@run $1" ${lambdabotWrapper} "@run $1"
''; '';
}; kind.filename = pkgs.writeDash "lambdabot-kind" ''
kind = {
env.HOME = config.krebs.reaktor2.coders.stateDir;
filename = pkgs.writeDash "lambdabot-kind" ''
${lambdabotWrapper} "@kind $1" ${lambdabotWrapper} "@kind $1"
''; '';
}; };
};
} }
{ {
activate = "match"; activate = "match";