-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
49 lines (40 loc) · 954 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ compiler ? "ghc902"
, ...
}:
let
## Import sources:
sources = import ./nix/sources.nix;
## Pinned nixpkgs:
pkgs = import sources.nixpkgs { };
## Get the haskell set:
haskell = pkgs.haskell.packages.${compiler};
## Get zamazingo:
zamazingo = haskell.callCabal2nix "zamazingo" ./. { };
## Get zamazingo Haskell dependencies:
zamazingoDeps = pkgs.haskell.lib.compose.getHaskellBuildInputs zamazingo;
## Get our GHC for development:
ghc = haskell.ghcWithPackages (_: zamazingoDeps);
in
pkgs.mkShell {
buildInputs = [
## Fancy stuff:
pkgs.figlet
pkgs.lolcat
## Release stuff:
pkgs.busybox
pkgs.gh
pkgs.git
pkgs.git-chglog
## Haskell stuff:
ghc
pkgs.cabal-install
pkgs.cabal2nix
pkgs.haskell-language-server
pkgs.haskellPackages.apply-refact
pkgs.hlint
pkgs.stylish-haskell
];
shellHook = ''
figlet -w 999 "ZAMAZINGO DEV SHELL" | lolcat -S 42
'';
}