-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshell.nix
35 lines (32 loc) · 946 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ pkgs ? import ./nix/nixpkgs.nix, herokuSecret ? null }:
let haskellStuff = with pkgs;
[
haskellPackages.haskell-language-server
ghc
haskellPackages.cabal-install
haskellPackages.cabal2nix
haskellPackages.implicit-hie
ghcid
haskellPackages.fourmolu
];
tools = with pkgs;
[
nixfmt
git
curl
# heroku
graphviz
];
all = haskellStuff ++ tools;
in pkgs.mkShell {
# specify which packages to add to the shell environment
packages = all;
# add all the dependencies, of the given packages, to the shell environment
inputsFrom = with pkgs; all;
HEROKU_API_KEY = herokuSecret;
shellHook =
if isNull herokuSecret then "" else ''
heroku container:login
docker login --username=_ --password=$(heroku auth:token) registry.heroku.com
'';
}