2018-06-12 01:28:38 +02:00
|
|
|
{ pkgs ? import <nixpkgs> {}, mode ? "shell" }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
modes = {
|
|
|
|
shell = "exec fish";
|
2018-06-20 20:12:48 +02:00
|
|
|
test = "exec yarn test";
|
2018-06-12 01:28:38 +02:00
|
|
|
run = "exec bin/hubot -a matrix";
|
|
|
|
};
|
|
|
|
|
|
|
|
in pkgs.stdenv.mkDerivation rec {
|
|
|
|
name = "asjon-dev";
|
|
|
|
source = ".";
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
nodejs nodePackages.coffee-script
|
2018-06-20 20:12:48 +02:00
|
|
|
yarn openssh graphicsmagick
|
2018-06-12 01:28:38 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = environment + getAttr mode modes;
|
|
|
|
environment = ''
|
|
|
|
#set env variables here
|
2018-06-20 20:12:48 +02:00
|
|
|
export PATH="node_modules/.bin:$PATH"
|
2018-06-12 01:28:38 +02:00
|
|
|
export AUTO_KILL_ON_UPDATE=1
|
|
|
|
'';
|
|
|
|
}
|