update nix expression

This commit is contained in:
rnhmjoj 2017-02-27 01:11:03 +01:00
parent d8de7099dd
commit 7fb4039efd
No known key found for this signature in database
GPG Key ID: 362BB82B7E496B7C

View File

@ -5,44 +5,23 @@ with pkgs.lib;
let let
modes = { modes = {
shell = "exec zsh"; shell = "exec fish";
test = "npm test"; test = "npm test";
run = "exec bin/hubot"; run = "exec bin/hubot -a matrix";
runTg = ''
telegram-cli \
-dWE \
-Z $HUBOT_TG_SCRIPT \
-P $HUBOT_TG_PORT > /dev/null 2>&1 &
bin/hubot -a tg
pkill -9 telegram-wo-key; exit
'';
};
telegram = pkgs.telegram-cli.override {
python = pkgs.python3;
}; };
in pkgs.stdenv.mkDerivation rec { in pkgs.stdenv.mkDerivation rec {
name = "asjon-dev"; name = "asjon-dev";
source = "."; source = ".";
buildInputs = node ++ external; node = with pkgs; [
node = with pkgs.nodePackages; [ nodejs nodePackages.coffee-script
pkgs.nodejs openssh graphicsmagick
mocha
coffee-script
];
external = with pkgs; [
zsh
telegram
graphicsmagick
]; ];
shellHook = environment + getAttr mode modes; shellHook = environment + getAttr mode modes;
environment = '' environment = ''
#set env variables here #set env variables here
export HUBOT_TG_SCRIPT=node_modules/hubot-tg/hubot.py export AUTO_KILL_ON_UPDATE=1
export HUBOT_TG_PORT=1123
export ADMIN_ROOM=user#123456
''; '';
} }