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,36 +47,21 @@ in {
-e "$@" -e "$@"
''; '';
in { in {
pl = { pl.filename = pkgs.writeDash "lambdabot-pl" ''
env.HOME = config.krebs.reaktor2.coders.stateDir; ${lambdabotWrapper} "@pl $1"
filename = pkgs.writeDash "lambdabot-pl" '' '';
${lambdabotWrapper} "@pl $1" type.filename = pkgs.writeDash "lambdabot-type" ''
''; ${lambdabotWrapper} "@type $1"
}; '';
type = { "let".filename = pkgs.writeDash "lambdabot-let" ''
env.HOME = config.krebs.reaktor2.coders.stateDir; ${lambdabotWrapper} "@let $1"
filename = pkgs.writeDash "lambdabot-type" '' '';
${lambdabotWrapper} "@type $1" run.filename = pkgs.writeDash "lambdabot-run" ''
''; ${lambdabotWrapper} "@run $1"
}; '';
"let" = { kind.filename = pkgs.writeDash "lambdabot-kind" ''
env.HOME = config.krebs.reaktor2.coders.stateDir; ${lambdabotWrapper} "@kind $1"
filename = pkgs.writeDash "lambdabot-let" '' '';
${lambdabotWrapper} "@let $1"
'';
};
run = {
env.HOME = config.krebs.reaktor2.coders.stateDir;
filename = pkgs.writeDash "lambdabot-run" ''
${lambdabotWrapper} "@run $1"
'';
};
kind = {
env.HOME = config.krebs.reaktor2.coders.stateDir;
filename = pkgs.writeDash "lambdabot-kind" ''
${lambdabotWrapper} "@kind $1"
'';
};
}; };
} }
{ {