about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/hie-packages.nix
blob: 5ed5fb62ca0011ee249e5cd5ab4645360d870da2 (plain) (blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
{ pkgs, stdenv, callPackage }: self:
let src = pkgs.fetchFromGitHub
      { owner = "haskell";
        repo = "haskell-ide-engine";
        rev = "3ec8e93e9ca751cf282556998851ffa65f32e06b";
        sha256 = "1wzqzvsa39c1cngmmjryqrq4vqdg6d4wp5wdf17vp96ljvz1cczw";
      };
    cabal-helper-src = pkgs.fetchgit
      { url = "https://gitlab.com/dxld/cabal-helper.git";
        rev = "4bfc6b916fcc696a5d82e7cd35713d6eabcb0533";
        sha256 = "1a8231as0wdvi0q73ha9lc0qrx23kmcwf910qaicvmdar5p2b15m";
      };
    ghc-dump-tree-src = pkgs.fetchgit
      { url = "https://gitlab.com/alanz/ghc-dump-tree.git";
        rev = "50f8b28fda675cca4df53909667c740120060c49";
        sha256 = "0v3r81apdqp91sv7avy7f0s3im9icrakkggw8q5b7h0h4js6irqj";
      };
    ghc-mod-src = pkgs.fetchFromGitHub
      { owner = "wz1000";
        repo = "ghc-mod";
        rev = "03c91ea53b6389e7a1fcf4e471171aa3d6c8de41";
        sha256 = "11iic93klsh5izp8v4mhl7vnnlib821cfhdymlpg4drx7zbm9il6";
      };
    HaRe-src = pkgs.fetchgit
      { url = "https://gitlab.com/alanz/HaRe.git";
        rev = "e325975450ce89d790ed3f92de3ef675967d9538";
        sha256 = "0z7r3l4j5a1brz7zb2rgd985m58rs0ki2p59y1l9i46fcy8r9y4g";
      };
    cabal-helper = self.cabal-helper_hie;
    haddock-library = self.haddock-library_1_4_4;
    hoogle = self.hoogle_5_0_14;
    ghc-dump-tree = self.ghc-dump-tree_hie;
    ghc-mod = self.ghc-mod_hie;
    HaRe = self.HaRe_hie;
in
  { ### Overrides required by hie
    cabal-helper_hie = callPackage
      ({ mkDerivation, base, bytestring, Cabal, cabal-install, containers
       , directory, exceptions, filepath, ghc-prim, mtl, process
       , semigroupoids, template-haskell, temporary, transformers
       , unix, unix-compat, utf8-string
       }:
       mkDerivation {
         pname = "cabal-helper";
         version = "0.8.0.0";
         src = cabal-helper-src;
         isLibrary = true;
         isExecutable = true;
         jailbreak = true;
         setupHaskellDepends = [ base Cabal directory filepath ];
         libraryHaskellDepends = [
           base Cabal directory filepath ghc-prim mtl process semigroupoids
           transformers unix unix-compat
         ];
         executableHaskellDepends = [
           base bytestring Cabal containers directory exceptions filepath
           ghc-prim mtl process template-haskell temporary transformers unix
           unix-compat utf8-string
         ];
         testHaskellDepends = [
           base bytestring Cabal directory exceptions filepath ghc-prim mtl
           process template-haskell temporary transformers unix unix-compat
           utf8-string
         ];
         testToolDepends = [ cabal-install ];
         postInstall =
           ''
             libexec="$out/libexec/$(basename $out/lib/ghc*/*ghc*)/$name"
             mkdir -p "$libexec"
             ln -sv $out/bin/cabal-helper-wrapper "$libexec"
           '';
         doCheck = false;
         description = "Simple interface to some of Cabal's configuration state, mainly used by ghc-mod";
         license = stdenv.lib.licenses.agpl3;
       }) {};
    ghc-dump-tree_hie = callPackage
      ({ mkDerivation, aeson, base, bytestring, ghc, optparse-applicative
       , pretty, pretty-show, process, unordered-containers
       , vector
       }:
       mkDerivation {
         pname = "ghc-dump-tree";
         version = "0.2.0.1";
         src = ghc-dump-tree-src;
         isLibrary = true;
         isExecutable = true;
         libraryHaskellDepends = [
           aeson base bytestring ghc pretty pretty-show process
           unordered-containers vector
         ];
         executableHaskellDepends = [
           aeson base bytestring ghc optparse-applicative pretty pretty-show
           process unordered-containers vector
         ];
         homepage = "https://github.com/edsko/ghc-dump-tree";
         description = "Dump GHC's parsed, renamed, and type checked ASTs";
         license = stdenv.lib.licenses.bsd3;
       }) {};
    ghc-mod-core = callPackage
      ({ mkDerivation, base, binary, bytestring, Cabal, cabal-helper
       , containers, deepseq, directory, djinn-ghc, extra, fclabels
       , filepath, fingertree, ghc, ghc-boot, ghc-paths, ghc-syb-utils
       , haskell-src-exts, hlint, monad-control, monad-journal, mtl
       , old-time, optparse-applicative, pipes, process, safe, semigroups
       , split, syb, template-haskell, temporary, text, time
       , transformers, transformers-base
       }:
       mkDerivation {
         pname = "ghc-mod-core";
         version = "5.9.0.0";
         src = "${ghc-mod-src}/core";
         setupHaskellDepends = [
           base Cabal containers directory filepath process template-haskell
           transformers
         ];
         libraryHaskellDepends = [
           base binary bytestring cabal-helper containers deepseq directory
           djinn-ghc extra fclabels filepath fingertree ghc ghc-boot ghc-paths
           ghc-syb-utils haskell-src-exts hlint monad-control monad-journal
           mtl old-time optparse-applicative pipes process safe semigroups
           split syb template-haskell temporary text time transformers
           transformers-base
         ];
         homepage = "https://github.com/DanielG/ghc-mod";
         description = "Happy Haskell Hacking";
         license = stdenv.lib.licenses.agpl3;
       }) { inherit cabal-helper; };
    ghc-mod_hie = callPackage
      ({ mkDerivation, base, binary, bytestring, Cabal, cabal-doctest
       , cabal-helper, containers, criterion, deepseq, directory
       , djinn-ghc, doctest, extra, fclabels, filepath, ghc, ghc-boot
       , ghc-mod-core, ghc-paths, ghc-syb-utils, haskell-src-exts, hlint
       , hspec, monad-control, monad-journal, mtl, old-time
       , optparse-applicative, pipes, process, safe, semigroups, shelltest
       , split, syb, template-haskell, temporary, text, time
       , transformers, transformers-base
       }:
       mkDerivation {
         pname = "ghc-mod";
         version = "5.9.0.0";
         src = ghc-mod-src;
         isLibrary = true;
         isExecutable = true;
         enableSeparateDataOutput = true;
         setupHaskellDepends = [
           base Cabal cabal-doctest containers directory filepath process
           template-haskell transformers
         ];
         libraryHaskellDepends = [
           base binary bytestring cabal-helper containers deepseq directory
           djinn-ghc extra fclabels filepath ghc ghc-boot ghc-mod-core
           ghc-paths ghc-syb-utils haskell-src-exts hlint monad-control
           monad-journal mtl old-time optparse-applicative pipes process safe
           semigroups split syb template-haskell temporary text time
           transformers transformers-base
         ];
         executableHaskellDepends = [
           base binary deepseq directory fclabels filepath ghc ghc-mod-core
           monad-control mtl old-time optparse-applicative process semigroups
           split time
         ];
         testHaskellDepends = [
           base cabal-helper containers directory doctest fclabels filepath
           ghc ghc-boot ghc-mod-core hspec monad-journal mtl process split
           temporary transformers
         ];
         testToolDepends = [ shelltest ];
         # Doesn't work with our doctest
         doCheck = false;
         benchmarkHaskellDepends = [
           base criterion directory filepath ghc-mod-core temporary
         ];
         homepage = "https://github.com/DanielG/ghc-mod";
         description = "Happy Haskell Hacking";
         license = stdenv.lib.licenses.agpl3;
       }) { shelltest = null; inherit cabal-helper; };
    HaRe_hie = callPackage
      ({ mkDerivation, attoparsec, base, base-prelude, Cabal, cabal-helper
       , case-insensitive, containers, conversion
       , conversion-case-insensitive, conversion-text, Diff, directory
       , filepath, foldl, ghc, ghc-exactprint, ghc-mod-core, ghc-syb-utils
       , gitrev, hslogger, hspec, HUnit, monad-control, mtl
       , optparse-applicative, optparse-simple, parsec, stdenv
       , Strafunski-StrategyLib, syb, syz, turtle
       }:
       mkDerivation {
         pname = "HaRe";
         version = "0.8.4.1";
         src = HaRe-src;
         isLibrary = true;
         isExecutable = true;
         enableSeparateDataOutput = true;
         libraryHaskellDepends = [
           base cabal-helper containers directory filepath ghc ghc-exactprint
           ghc-mod-core ghc-syb-utils hslogger monad-control mtl
           Strafunski-StrategyLib syb syz
         ];
         executableHaskellDepends = [
           base Cabal ghc-mod-core gitrev mtl optparse-applicative
           optparse-simple
         ];
         testHaskellDepends = [
           attoparsec base base-prelude cabal-helper case-insensitive
           containers conversion conversion-case-insensitive conversion-text
           Diff directory filepath foldl ghc ghc-exactprint ghc-mod-core
           ghc-syb-utils hslogger hspec HUnit monad-control mtl parsec
           Strafunski-StrategyLib syb syz turtle
         ];
         # Test directory doesn't exist
         doCheck = false;
         homepage = "https://github.com/RefactoringTools/HaRe/wiki";
         description = "the Haskell Refactorer";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit cabal-helper; };
    ### hie packages
    haskell-ide-engine = callPackage
      ({ mkDerivation, aeson, async, base, bytestring, Cabal, cabal-install
       , containers, data-default, Diff, directory, either, ekg, filepath, ghc
       , ghc-mod-core, gitrev, haskell-lsp, hie-apply-refact, hie-base
       , hie-brittany, hie-build-plugin, hie-eg-plugin-async
       , hie-example-plugin2, hie-ghc-mod, hie-ghc-tree, hie-haddock
       , hie-hare, hie-hoogle, hie-plugin-api, hoogle, hslogger, hspec
       , lens, mtl, optparse-simple, QuickCheck, quickcheck-instances
       , sorted-list, stm, text, time, transformers
       , unordered-containers, vector, vinyl, yaml, yi-rope
       }:
       mkDerivation {
         pname = "haskell-ide-engine";
         version = "0.1.0.0";
         inherit src;
         isLibrary = true;
         isExecutable = true;
         libraryHaskellDepends = [
           aeson async base bytestring Cabal containers data-default directory
           either filepath ghc ghc-mod-core gitrev haskell-lsp
           hie-apply-refact hie-base hie-brittany hie-ghc-mod hie-haddock
           hie-hare hie-hoogle hie-plugin-api hslogger lens mtl
           optparse-simple sorted-list stm text transformers
           unordered-containers vector yi-rope
         ];
         executableHaskellDepends = [
           base Cabal containers directory ekg ghc-mod-core gitrev haskell-lsp
           hie-apply-refact hie-build-plugin hie-eg-plugin-async
           hie-example-plugin2 hie-ghc-mod hie-ghc-tree hie-hare hie-hoogle
           hie-plugin-api hslogger optparse-simple stm text time transformers
           unordered-containers vinyl
         ];
         testHaskellDepends = [
           aeson base containers Diff directory filepath ghc-mod-core
           haskell-lsp hie-apply-refact hie-base hie-eg-plugin-async
           hie-example-plugin2 hie-ghc-mod hie-ghc-tree hie-hare hie-hoogle
           hie-plugin-api hoogle hslogger hspec QuickCheck
           quickcheck-instances stm text transformers unordered-containers
           vector vinyl yaml
         ];
         preCheck = "export HOME=$NIX_BUILD_TOP/home; mkdir $HOME";
         # https://github.com/haskell/haskell-ide-engine/issues/425
         # The disabled tests do work in a local nix-shell with cabal available.
         patches = [ ./patches/hie-testsuite.patch ];
         homepage = "http://github.com/githubuser/haskell-ide-engine#readme";
         description = "Provide a common engine to power any Haskell IDE";
         license = stdenv.lib.licenses.bsd3;
      }) { inherit hoogle; };
    hie-apply-refact = callPackage
      ({ mkDerivation, aeson, apply-refact, base, either, extra, ghc-mod
       , ghc-mod-core, haskell-src-exts, hie-base, hie-plugin-api, hlint
       , text, transformers
       }:
       mkDerivation {
         pname = "hie-apply-refact";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-apply-refact";
         libraryHaskellDepends = [
           aeson apply-refact base either extra ghc-mod ghc-mod-core
           haskell-src-exts hie-base hie-plugin-api hlint text transformers
         ];
         description = "Haskell IDE Apply Refact plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit ghc-mod; };
    hie-base = callPackage
      ({ mkDerivation, aeson, base, haskell-lsp, text }:
       mkDerivation {
         pname = "hie-base";
         version = "0.1.0.0";
         inherit src;
         preUnpack = "sourceRoot=source/hie-base";
         libraryHaskellDepends = [ aeson base haskell-lsp text ];
         description = "Haskell IDE API base types";
         license = stdenv.lib.licenses.bsd3;
       }) {};
    hie-brittany = callPackage
      ({ mkDerivation, aeson, base, brittany, ghc-mod, ghc-mod-core
       , haskell-lsp, hie-plugin-api, lens, text
       }:
       mkDerivation {
         pname = "hie-brittany";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-brittany";
         libraryHaskellDepends = [
           aeson base brittany ghc-mod ghc-mod-core haskell-lsp hie-plugin-api
           lens text
         ];
         description = "Haskell IDE Hoogle plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit ghc-mod; };
    hie-build-plugin = callPackage
      ({ mkDerivation, aeson, base, bytestring, Cabal, cabal-helper
       , containers, directory, filepath, haskell-lsp, hie-plugin-api
       , process, stm, text, transformers, yaml
       }:
       mkDerivation {
         pname = "hie-build-plugin";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-build-plugin";
         libraryHaskellDepends = [
           aeson base bytestring Cabal cabal-helper containers directory
           filepath haskell-lsp hie-plugin-api process stm text transformers
           yaml
         ];
         description = "Haskell IDE build plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit cabal-helper; };
    hie-eg-plugin-async = callPackage
      ({ mkDerivation, base, ghc-mod-core, hie-plugin-api, stm
       , text
       }:
       mkDerivation {
         pname = "hie-eg-plugin-async";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-eg-plugin-async";
         libraryHaskellDepends = [
           base ghc-mod-core hie-plugin-api stm text
         ];
         description = "Haskell IDE example plugin, using async processes";
         license = stdenv.lib.licenses.bsd3;
       }) {};
    hie-example-plugin2 = callPackage
      ({ mkDerivation, base, hie-plugin-api, text }:
       mkDerivation {
         pname = "hie-example-plugin2";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-example-plugin2";
         libraryHaskellDepends = [ base hie-plugin-api text ];
         description = "Haskell IDE example plugin";
         license = stdenv.lib.licenses.bsd3;
       }) {};
    hie-ghc-mod = callPackage
      ({ mkDerivation, aeson, base, containers, ghc, ghc-mod, ghc-mod-core
       , hie-base, hie-plugin-api, text, transformers
       }:
       mkDerivation {
         pname = "hie-ghc-mod";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-ghc-mod";
         libraryHaskellDepends = [
           aeson base containers ghc ghc-mod ghc-mod-core hie-base
           hie-plugin-api text transformers
         ];
         description = "Haskell IDE ghc-mod plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit ghc-mod; };
    hie-ghc-tree = callPackage
      ({ mkDerivation, aeson, base, ghc-dump-tree, ghc-mod, ghc-mod-core
       , hie-base, hie-plugin-api, text
       }:
       mkDerivation {
         pname = "hie-ghc-tree";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-ghc-tree";
         libraryHaskellDepends = [
           aeson base ghc-dump-tree ghc-mod ghc-mod-core hie-base
           hie-plugin-api text
         ];
         description = "Haskell IDE GHC Tree plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit ghc-dump-tree ghc-mod; };
    hie-haddock = callPackage
      ({ mkDerivation, aeson, base, containers, directory, either
       , filepath, ghc, ghc-exactprint, ghc-mod, ghc-mod-core, haddock-api
       , haddock-library, HaRe, haskell-lsp, hie-base, hie-ghc-mod
       , hie-hare, hie-plugin-api, lens, monad-control, mtl, text
       , transformers
       }:
       mkDerivation {
         pname = "hie-haddock";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-haddock";
         libraryHaskellDepends = [
           aeson base containers directory either filepath ghc ghc-exactprint
           ghc-mod ghc-mod-core haddock-api haddock-library HaRe haskell-lsp
           hie-base hie-ghc-mod hie-hare hie-plugin-api lens monad-control mtl
           text transformers
         ];
         description = "Haskell IDE Haddock plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit haddock-library HaRe ghc-mod; };
    hie-hare = callPackage
      ({ mkDerivation, aeson, base, containers, Diff, either, ghc
       , ghc-exactprint, ghc-mod, ghc-mod-core, HaRe, haskell-lsp
       , hie-base, hie-ghc-mod, hie-plugin-api, lens, monad-control, mtl
       , text, transformers
       }:
       mkDerivation {
         pname = "hie-hare";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-hare";
         libraryHaskellDepends = [
           aeson base containers Diff either ghc ghc-exactprint ghc-mod
           ghc-mod-core HaRe haskell-lsp hie-base hie-ghc-mod hie-plugin-api
           lens monad-control mtl text transformers
         ];
         description = "Haskell IDE HaRe plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit ghc-mod HaRe; };
    hie-hoogle = callPackage
      ({ mkDerivation, aeson, base, directory, filepath, ghc-mod
       , ghc-mod-core, hie-plugin-api, hoogle, tagsoup, text
       }:
       mkDerivation {
         pname = "hie-hoogle";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-hoogle";
         libraryHaskellDepends = [
           aeson base directory filepath ghc-mod ghc-mod-core hie-plugin-api
           hoogle tagsoup text
         ];
         description = "Haskell IDE Hoogle plugin";
         license = stdenv.lib.licenses.bsd3;
       }) { inherit ghc-mod hoogle; };
    hie-plugin-api = callPackage
      ({ mkDerivation, aeson, base, containers, Diff, directory, either
       , filepath, fingertree, ghc, ghc-mod-core, haskell-lsp, hie-base
       , hslogger, lifted-base, monad-control, mtl, stdenv, stm, syb, text
       , time, transformers, unordered-containers
       }:
       mkDerivation {
         pname = "hie-plugin-api";
         version = "0.1.0.0";
         inherit src;
         postUnpack = "sourceRoot=source/hie-plugin-api";
         libraryHaskellDepends = [
           aeson base containers Diff directory either filepath fingertree ghc
           ghc-mod-core haskell-lsp hie-base hslogger lifted-base
           monad-control mtl stm syb text time transformers
           unordered-containers
         ];
         description = "Haskell IDE API for plugin communication";
         license = stdenv.lib.licenses.bsd3;
       }) {};
  }