asjon/shell.nix

28 lines
476 B
Nix
Raw Normal View History

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