Skip to content

Commit b7aa138

Browse files
committed
Fix compat. with ghc865, add more packages and rationale
1 parent 93844f9 commit b7aa138

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

shell.nix

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# This shell.nix file is designed for use with cabal build
2+
# It aims to leverage the nix cache in as much as possible
3+
# It does not aim to replace Cabal/Stack with Nix
4+
5+
# Before making changes, ensure that the Nix expression works
6+
# for all the GHC versions supported by the project (8.6.x - 8.10.x)
7+
18
{ sources ? import nix/sources.nix,
29
nixpkgs ? import sources.nixpkgs {},
310
compiler ? "default"
@@ -8,10 +15,21 @@ let haskellPackagesForProject = if compiler == "default"
815
then haskellPackages.ghcWithPackages
916
else haskell.packages.${compiler}.ghcWithPackages;
1017

11-
# these packages fail to build with ghc8101
12-
extraPackages = p: if compiler == "ghc8101"
13-
then []
14-
else [p.haskell-lsp p.lsp-test];
18+
extraPackages = p: with p;
19+
if compiler == "ghc8101" then
20+
[conduit-extra
21+
conduit-parse
22+
hie-bios
23+
yaml
24+
]
25+
else if compiler == "ghc865" then [] else
26+
# compiler = ghc88
27+
[ haskell-lsp
28+
lsp-test
29+
brittany
30+
ormolu
31+
stylish-haskell
32+
];
1533

1634
compilerWithPackages = haskellPackagesForProject(p:
1735
with p;
@@ -21,8 +39,6 @@ let haskellPackagesForProject = if compiler == "default"
2139
base16-bytestring
2240
blaze-builder
2341
blaze-markup
24-
conduit-extra
25-
conduit-parse
2642
cryptohash-sha1
2743
data-default
2844
data-default-class
@@ -34,14 +50,19 @@ let haskellPackagesForProject = if compiler == "default"
3450
floskell
3551
fuzzy
3652
generic-deriving
53+
ghc-check
3754
gitrev
3855
Glob
56+
haddock-library
3957
happy
4058
haskell-src-exts
4159
hslogger
4260
hspec
61+
HsYAML-aeson
4362
lens
63+
megaparsec
4464
network
65+
opentelemetry
4566
optparse-simple
4667
QuickCheck
4768
parsers
@@ -55,16 +76,19 @@ let haskellPackagesForProject = if compiler == "default"
5576
safe-exceptions
5677
shake
5778
sorted-list
79+
strict
5880
tasty
81+
tasty-ant-xml
82+
tasty-expected-failure
5983
tasty-golden
6084
tasty-hunit
6185
tasty-rerun
6286
temporary
6387
text
6488
typed-process
89+
unix-compat
6590
unordered-containers
6691
xml
67-
yaml
6892
zlib
6993
] ++ extraPackages p);
7094
in

0 commit comments

Comments
 (0)