add nix expression

This commit is contained in:
Michele Guerini Rocco 2018-06-11 23:28:38 +00:00
parent ec09b5f00b
commit 5fdb274023
Signed by: rnhmjoj
GPG Key ID: 91BE884FBA4B591A

27
shell.nix Normal file
View File

@ -0,0 +1,27 @@
{ 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
'';
}