asjon/shell.nix

28 lines
469 B
Nix
Raw Normal View History

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