-
Notifications
You must be signed in to change notification settings - Fork 1
/
shell.nix
22 lines (21 loc) · 955 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
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc802"}:
let
# NB: these are only for the dev/test env, and should not be required for building the project
inherit (nixpkgs) pkgs;
#...can't do it like this otherwise overides is undefined for default.nix:
#haskellPackagesDevTools = pkgs.haskell.packages.${compiler}.ghcWithPackages extras;
ghc = pkgs.haskell.packages.${compiler};
haskellPackagesDevTools = ghc.override {
overrides = self: super: {
ghc = ghc.withPackages extras;
ghcWithPackages = self.ghc.withPackages;
};
};
extras = haskellPackages: with haskellPackages; [
# libraries
aeson-better-errors ycextra
# tools
ghc-mod hsdev stylish-haskell hindent codex
];
in
(import ./default.nix { inherit nixpkgs compiler; haskellPackages=haskellPackagesDevTools;}).env