forked from NixOS/cabal2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
42 lines (39 loc) · 1003 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
{ 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)
] ++ 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;
}