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