-
-
Notifications
You must be signed in to change notification settings - Fork 157
/
shell.nix
44 lines (41 loc) · 1.04 KB
/
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
{ pkgs ? import <nixpkgs> { }
, ghcVersion ? pkgs.haskellPackages.ghc.version
, withHls ? true
}:
let
haskellPackages = pkgs.haskell.packages."ghc${
builtins.replaceStrings [ "." ] [ "" ] ghcVersion
}";
ghc = haskellPackages.ghcWithHoogle (hps: [
hps.ansi-wl-pprint
hps.hopenssl
hps.hpack
hps.lens
hps.optparse-applicative
hps.pretty
hps.split
hps.yaml
hps.monad-par
hps.monad-par-extras
hps.tasty
hps.tasty-golden
hps.utf8-string
hps.tar
hps.hspec
hps.parsec-class
]);
in pkgs.mkShell {
packages = [
ghc
pkgs.cabal-install
pkgs.haskell-ci
(pkgs.lib.getLib pkgs.openssl)
# Needed to run `cabal2nix`:
pkgs.nix-prefetch-scripts
] ++ pkgs.lib.optionals withHls [
haskellPackages.haskell-language-server
];
# Make Paths_ module of distribution-nixpkgs find its data files in the shell.
# https://cabal.readthedocs.io/en/latest/cabal-package.html#accessing-data-files-from-package-code
distribution_nixpkgs_datadir = toString ./distribution-nixpkgs;
}