File tree Expand file tree Collapse file tree 1 file changed +60
-5
lines changed Expand file tree Collapse file tree 1 file changed +60
-5
lines changed Original file line number Diff line number Diff line change
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
+ # while reducing Nix maintenance costs.
4
+ # It does **not** aim to replace Cabal/Stack with Nix
5
+
6
+
1
7
{ sources ? import nix/sources.nix ,
2
8
nixpkgs ? import sources . nixpkgs { } ,
3
9
compiler ? "default"
4
10
} :
5
11
with nixpkgs ;
6
12
7
- let haskellPackagesForProject = if compiler == "default"
8
- then haskellPackages . ghcWithPackages
9
- else haskell . packages . ${ compiler } . ghcWithPackages ;
13
+ let defaultCompiler = "ghc" + lib . replaceStrings [ "." ] [ "" ] haskellPackages . ghc . version ;
14
+ haskellPackagesForProject = p :
15
+ if compiler == "default" || compiler == defaultCompiler
16
+ then haskellPackages . ghcWithPackages p
17
+ # for all other compilers there is no Nix cache so dont bother building deps with NIx
18
+ else haskell . packages . ${ compiler } . ghcWithPackages [ ] ;
10
19
11
20
compilerWithPackages = haskellPackagesForProject ( p :
12
21
with p ;
13
- [ aeson
22
+ [
23
+ Diff
24
+ Glob
25
+ HsYAML-aeson
26
+ QuickCheck
27
+ aeson
28
+ alex
14
29
async
30
+ base16-bytestring
31
+ blaze-builder
32
+ blaze-markup
33
+ brittany
34
+ conduit-extra
35
+ conduit-parse
36
+ cryptohash-sha1
37
+ data-default
38
+ data-default-class
39
+ data-default-instances-containers
40
+ data-default-instances-dlist
41
+ data-default-instances-old-locale
15
42
extra
43
+ floskell
44
+ fuzzy
45
+ generic-deriving
46
+ ghc-check
16
47
gitrev
48
+ haddock-library
49
+ happy
17
50
haskell-lsp
51
+ haskell-src-exts
52
+ hie-bios
53
+ hslogger
54
+ hspec
18
55
lens
56
+ lsp-test
57
+ megaparsec
19
58
network
59
+ opentelemetry
20
60
optparse-simple
61
+ ormolu
62
+ parser-combinators
63
+ parsers
21
64
prettyprinter
22
- QuickCheck
65
+ prettyprinter-ansi-terminal
66
+ primes
67
+ psqueues
23
68
regex-tdfa
24
69
rope-utf16-splay
25
70
safe-exceptions
26
71
shake
72
+ sorted-list
73
+ strict
74
+ stylish-haskell
27
75
tasty
76
+ tasty-ant-xml
77
+ tasty-expected-failure
28
78
tasty-golden
29
79
tasty-hunit
30
80
tasty-rerun
31
81
temporary
32
82
text
83
+ typed-process
84
+ unix-compat
33
85
unordered-containers
86
+ xml
87
+ yaml
88
+ zlib
34
89
] ) ;
35
90
in
36
91
stdenv . mkDerivation {
You can’t perform that action at this time.
0 commit comments