forked from haskell/hackage-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hackage-server.cabal
553 lines (476 loc) · 18.2 KB
/
hackage-server.cabal
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
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
cabal-version: 3.0
name: hackage-server
version: 0.5.1
category: Distribution
synopsis: The Hackage web server
description: The new implementation of the Hackage web server, based on the
Happstack architecture. This is the implementation used to power
<http://hackage.haskell.org/>
.
It is designed to be easy to run your own instance.
It also includes a doc builder client and a mirroring client.
author: Duncan Coutts <duncan@community.haskell.org>,
David Himmelstrup <lemmih@gmail.com>,
Ross Paterson <ross@soi.city.ac.uk>,
Matthew Gruen <wikigracenotes@gmail.com>
maintainer: Duncan Coutts <duncan@community.haskell.org>,
Matthew Gruen <wikigracenotes@gmail.com>
copyright: 2008-2015 Duncan Coutts,
2012-2013 Edsko de Vries,
2013 Google Inc.,
2010-2011 Matthew Gruen,
2009-2010 Antoine Latter,
2008 David Himmelstrup,
2007 Ross Paterson
license: BSD-3-Clause
license-file: LICENSE
tested-with: GHC == { 8.6.5, 8.4.4, 8.2.2, 8.0.2, 7.10.3, 7.8.4, 7.6.3 }
data-dir: datafiles
data-files:
templates/**/*.st
static/**/*.css
static/**/*.js
static/**/*.svg
static/**/*.png
static/**/*.ico
TUF/README.md
TUF/mirrors.json
TUF/root.json
TUF/snapshot.private
TUF/timestamp.private
extra-source-files:
tests/permissions-tarballs/*.tar.gz
tests/unpack-checks/correct-package-0.1.0.0/LICENSE
tests/unpack-checks/correct-package-0.1.0.0/Main.hs
tests/unpack-checks/correct-package-0.1.0.0/Setup.hs
tests/unpack-checks/correct-package-0.1.0.0/correct-package.cabal
tests/unpack-checks/missing-configure-0.1.0.0/LICENSE
tests/unpack-checks/missing-configure-0.1.0.0/Main.hs
tests/unpack-checks/missing-configure-0.1.0.0/Setup.hs
tests/unpack-checks/missing-configure-0.1.0.0/missing-configure.cabal
tests/unpack-checks/bad-specver-package-0/LICENSE
tests/unpack-checks/bad-specver-package-0/Main.hs
tests/unpack-checks/bad-specver-package-0/Setup.hs
tests/unpack-checks/bad-specver-package-0/bad-specver-package.cabal
source-repository head
type: git
location: https://github.com/haskell/hackage-server
flag minimal
default: False
description: Include only the minimum feature set.
manual: True
flag debug
default: False
description: Include debugging features
manual: True
-- Requires working local outgoing email
flag test-create-user
default: False
manual: True
flag cabal-parsers
description: Enable experimental @cabal-parsers@ checks
manual: True
default: False
----------------------------------------------------------------------------
common defaults
default-language: Haskell2010
-- version ranges of pre-installed packages for GHC 7.6 through GHC 8.0
--
-- when possible, the CI jobs use `installed`-constraints on these;
-- see `cabal.project.local-ghc-${VERSION}` files
build-depends:
, array >= 0.4 && < 0.6
, base >= 4.6 && < 4.13
, binary >= 0.5 && < 0.9
, bytestring >= 0.10 && < 0.11
, deepseq >= 1.3 && < 1.5
, directory >= 1.2 && < 1.4
, filepath >= 1.3 && < 1.5
, pretty >= 1.0 && < 1.2
, process >= 1.1 && < 1.7
, time >= 1.4 && < 1.9
, transformers >= 0.3 && < 0.6
, unix >= 2.6 && < 2.8
, scientific
-- other dependencies shared by most components
build-depends:
, aeson ^>= 1.1
, Cabal ^>= 3.2.1.0
, containers ^>= 0.5.0
, fail ^>= 4.9.0
-- we use Control.Monad.Except, introduced in mtl-2.2.1
, mtl ^>= 2.2.1
, network ^>= 2.6
, network-uri ^>= 2.6
, parsec ^>= 3.1.13
, tar ^>= 0.5
, text ^>= 1.2.2
, unordered-containers ^>= 0.2.3.0
, vector ^>= 0.12
, zlib ^>= 0.6.2
ghc-options: -Wall -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-deprecated-flags -funbox-strict-fields
if impl(ghc >= 8.2)
ghc-options: -Werror=incomplete-patterns -Werror=missing-methods
other-extensions: CPP, TemplateHaskell
library lib-server
import: defaults
-- TODO: move this into a 'library lib-client';
-- needs minor source-tree restructuring
exposed-modules:
Distribution.Client
Distribution.Client.Cron
Distribution.Client.UploadLog
Distribution.Client.Index
Distribution.Client.Mirror.CmdLine
Distribution.Client.Mirror.Config
Distribution.Client.Mirror.Repo.Hackage2
Distribution.Client.Mirror.Repo.Local
Distribution.Client.Mirror.Repo.Util
Distribution.Client.Mirror.Repo.Secure
Distribution.Client.Mirror.Repo.Types
Distribution.Client.Mirror.Repo
Distribution.Client.Mirror.Session
Distribution.Client.Mirror.State
Distribution.Client.DistroMap
Distribution.Client.HtPasswdDb
Distribution.Client.ParseApacheLogs
Distribution.Client.TagsFile
Distribution.Client.UserAddressesDb
-- misc internal modules
other-modules:
Data.IntTrie
Data.StringTable
Data.TarIndex
exposed-modules:
Paths_hackage_server
autogen-modules:
Paths_hackage_server
exposed-modules:
Distribution.Server
Distribution.Server.Prelude
Distribution.Server.Framework
Distribution.Server.Framework.Auth
Distribution.Server.Framework.AuthTypes
Distribution.Server.Framework.AuthCrypt
Distribution.Server.Framework.BlobStorage
Distribution.Server.Framework.Cache
Distribution.Server.Framework.Cron
Distribution.Server.Framework.Error
Distribution.Server.Framework.Logging
Distribution.Server.Framework.Feature
Distribution.Server.Framework.Hook
Distribution.Server.Framework.HtmlFormWrapper
Distribution.Server.Framework.Instances
Distribution.Server.Framework.MemState
Distribution.Server.Framework.MemSize
Distribution.Server.Framework.Resource
Distribution.Server.Framework.RequestContentTypes
Distribution.Server.Framework.ResponseContentTypes
Distribution.Server.Framework.CacheControl
Distribution.Server.Framework.BackupDump
Distribution.Server.Framework.BackupRestore
Distribution.Server.Framework.ServerEnv
Distribution.Server.Framework.Templating
Distribution.Server.Framework.HappstackUtils
Distribution.Server.Packages.Index
Distribution.Server.Packages.ModuleForest
Distribution.Server.Packages.PackageIndex
Distribution.Server.Packages.Types
Distribution.Server.Packages.Unpack
Distribution.Server.Packages.Render
Distribution.Server.Packages.ChangeLog
Distribution.Server.Packages.Readme
Distribution.Server.Packages.Metadata
-- [not used by anyone] Distribution.Server.Pages.Distributions
Distribution.Server.Pages.Group
Distribution.Server.Pages.Index
Distribution.Server.Pages.Package
Distribution.Server.Pages.PackageFromTemplate
Distribution.Server.Pages.Package.HaddockHtml
Distribution.Server.Pages.Package.HaddockParse
Distribution.Server.Pages.Recent
Distribution.Server.Pages.AdminLog
-- [reverse index disabled] Distribution.Server.Pages.Reverse
Distribution.Server.Pages.Template
Distribution.Server.Pages.Util
Distribution.Server.Users.Group
Distribution.Server.Users.State
Distribution.Server.Users.Types
Distribution.Server.Users.Backup
Distribution.Server.Users.Users
Distribution.Server.Users.AuthToken
Distribution.Server.Users.UserIdSet
Distribution.Server.Util.Histogram
Distribution.Server.Util.CountingMap
Distribution.Server.Util.CabalRevisions
Distribution.Server.Util.DocMeta
Distribution.Server.Util.Parse
Distribution.Server.Util.ServeTarball
-- [unused] Distribution.Server.Util.TarIndex
Distribution.Server.Util.GZip
Distribution.Server.Util.ContentType
Distribution.Server.Util.SigTerm
Distribution.Server.Util.ReadDigest
Distribution.Server.Util.Nonce
Distribution.Server.Util.Merge
Distribution.Server.Util.ParseSpecVer
Distribution.Server.Features
Distribution.Server.Features.Core
Distribution.Server.Features.Core.State
Distribution.Server.Features.Core.Backup
Distribution.Server.Features.Security
Distribution.Server.Features.Security.Backup
Distribution.Server.Features.Security.FileInfo
Distribution.Server.Features.Security.Layout
Distribution.Server.Features.Security.MD5
Distribution.Server.Features.Security.Migration
Distribution.Server.Features.Security.Orphans
Distribution.Server.Features.Security.ResponseContentTypes
Distribution.Server.Features.Security.SHA256
Distribution.Server.Features.Security.State
Distribution.Server.Features.Mirror
Distribution.Server.Features.Upload
Distribution.Server.Features.Upload.State
Distribution.Server.Features.Upload.Backup
Distribution.Server.Features.Users
if flag(minimal)
cpp-options: -DMINIMAL
else
exposed-modules:
Distribution.Server.Features.TarIndexCache
Distribution.Server.Features.TarIndexCache.State
Distribution.Server.Features.LegacyRedirects
Distribution.Server.Features.LegacyPasswds
Distribution.Server.Features.LegacyPasswds.Auth
Distribution.Server.Features.PackageContents
Distribution.Server.Features.AdminFrontend
Distribution.Server.Features.AdminLog
Distribution.Server.Features.BuildReports
Distribution.Server.Features.BuildReports.BuildReport
Distribution.Server.Features.BuildReports.BuildReports
Distribution.Server.Features.BuildReports.Backup
Distribution.Server.Features.BuildReports.Render
Distribution.Server.Features.BuildReports.State
Distribution.Server.Features.PackageCandidates
Distribution.Server.Features.PackageCandidates.Types
Distribution.Server.Features.PackageCandidates.State
Distribution.Server.Features.PackageCandidates.Backup
Distribution.Server.Features.PackageFeed
Distribution.Server.Features.PackageList
Distribution.Server.Features.Distro
Distribution.Server.Features.Distro.Distributions
Distribution.Server.Features.Distro.Backup
Distribution.Server.Features.Distro.State
Distribution.Server.Features.Distro.Types
Distribution.Server.Features.Documentation
Distribution.Server.Features.Documentation.State
Distribution.Server.Features.DownloadCount
Distribution.Server.Features.DownloadCount.State
Distribution.Server.Features.DownloadCount.Backup
Distribution.Server.Features.EditCabalFiles
Distribution.Server.Features.Html
Distribution.Server.Features.Html.HtmlUtilities
Distribution.Server.Features.HoogleData
Distribution.Server.Features.HaskellPlatform
Distribution.Server.Features.HaskellPlatform.State
Distribution.Server.Features.Search
Distribution.Server.Features.Search.BM25F
Distribution.Server.Features.Search.DocIdSet
Distribution.Server.Features.Search.DocTermIds
Distribution.Server.Features.Search.DocFeatVals
Distribution.Server.Features.Search.ExtractDescriptionTerms
Distribution.Server.Features.Search.ExtractNameTerms
Distribution.Server.Features.Search.PkgSearch
Distribution.Server.Features.Search.SearchEngine
Distribution.Server.Features.Search.SearchIndex
Distribution.Server.Features.Search.TermBag
Distribution.Server.Features.Sitemap.Functions
Distribution.Server.Features.Votes
Distribution.Server.Features.Votes.State
Distribution.Server.Features.Votes.Render
Distribution.Server.Features.RecentPackages
Distribution.Server.Features.PreferredVersions
Distribution.Server.Features.PreferredVersions.State
Distribution.Server.Features.PreferredVersions.Backup
-- [reverse index disabled] Distribution.Server.Features.ReverseDependencies
-- [reverse index disabled] Distribution.Server.Features.ReverseDependencies.State
Distribution.Server.Features.Tags
Distribution.Server.Features.Tags.Backup
Distribution.Server.Features.Tags.State
Distribution.Server.Features.UserDetails
Distribution.Server.Features.UserSignup
Distribution.Server.Features.StaticFiles
Distribution.Server.Features.ServerIntrospect
Distribution.Server.Features.Sitemap
if flag(debug)
cpp-options: -DDEBUG
other-modules:
Distribution.Server.Features.Crash
-- Except for GHC-bundled libraries (see above), it's more easier/manageable from
-- a maintenance POV to support only single major-version-ranges
--
-- NB: see also build-depends in `common defaults`!
build-depends:
, HStringTemplate ^>= 0.8
, HTTP ^>= 4000.3.6
, QuickCheck ^>= 2.9
, acid-state ^>= 0.14
, async ^>= 2.2.1
, attoparsec ^>= 0.13
, base16-bytestring ^>= 0.1
, base64-bytestring ^>= 1.0
--NOTE: blaze-builder-0.4 is now a compat package that uses bytestring-0.10 builder
, blaze-builder ^>= 0.4
, blaze-html ^>= 0.9
, cereal ^>= 0.5
, cheapskate ^>= 0.1
, cryptohash-md5 ^>= 0.11.100
, cryptohash-sha256 ^>= 0.11.100
, csv ^>= 0.1
, ed25519 ^>= 0.0.5
, hackage-security ^>= 0.6
, hackage-security-HTTP ^>= 0.1.1
, haddock-library ^>= 1.7.0
, happstack-server ^>= 7.5
, hashable ^>= 1.2
, hslogger ^>= 1.3.1
, lifted-base ^>= 0.2.1
, mime-mail ^>= 0.4
, random ^>= 1.1
, rss ^>= 3000.2.0.7
, safecopy ^>= 0.9.1
, semigroups ^>= 0.18.3
, split ^>= 0.2
, stm ^>= 2.5.0
, tagged ^>= 0.8.5
, time-locale-compat ^>= 0.1.0.1
, xhtml ^>= 3000.2
, xmlgen ^>= 0.6
if !flag(minimal)
build-depends: snowball ^>= 1.0
, tokenize ^>= 0.3
if flag(cabal-parsers)
build-depends: cabal-parsers ^>= 0
if !os(darwin)
extra-libraries: crypt
----------------------------------------------------------------------------
common exe-defaults
import: defaults
build-depends: lib-server
hs-source-dirs: exes
ghc-options: -threaded -rtsopts
other-modules: Paths_hackage_server
autogen-modules: Paths_hackage_server
executable hackage-server
import: exe-defaults
main-is: Main.hs
ghc-options: -with-rtsopts=-I00
executable hackage-mirror
import: exe-defaults
main-is: MirrorClient.hs
build-depends:
-- version constraints inherited from lib-server
, HTTP
, hackage-security
executable hackage-build
import: exe-defaults
main-is: BuildClient.hs
build-depends:
-- version constraints inherited from lib-server
, HTTP
-- Runtime dependency only;
-- TODO: we have no proper support for this kind of dependencies in cabal
-- `build-tool-depends` specifies compile/test-time deps, but not run-time deps
--
-- build-tool-depends: hscolour:hscolour >= 1.8
-- ghc-options: -threaded option is necessary for correct handling
-- of CTRL-C (not sure why :( )
executable hackage-import
import: exe-defaults
-- TODO/FIXME: the code has bitrotten
buildable: False
main-is: ImportClient.hs
build-depends:
-- version constraints inherited from lib-server
, HTTP
, async
, csv
, time-locale-compat
----------------------------------------------------------------------------
common test-defaults
import: defaults
build-depends: lib-server
hs-source-dirs: tests
ghc-options: -threaded -rtsopts -fno-warn-orphans
other-modules: Paths_hackage_server
autogen-modules: Paths_hackage_server
test-suite HighLevelTest
import: test-defaults
type: exitcode-stdio-1.0
main-is: HighLevelTest.hs
other-modules:
HackageClientUtils
Run
MailUtils
HttpUtils
Package
Util
-- This tells cabal that this test depends on the executable
-- component 'hackage-server' from this very same package, as well
-- as adding the build-folder where the `hackage-server`
-- executable can be found in front of $PATH
--
-- TODO: hackage-server isn't build-tool, it's run-tool!
-- so if this works, it's accidental!
build-tool-depends: hackage-server:hackage-server
-- NOTE: lib-server is not a real dependency; it's only used to inherit version constraints
build-depends:
-- version constraints inherited from lib-server
, HTTP
, base64-bytestring
, random
-- component-specific dependencies
, xml ^>= 1.3.14
, io-streams ^>= 1.5.0.1
, http-io-streams ^>= 0.1.0.0
test-suite CreateUserTest
import: test-defaults
if ! flag(test-create-user)
buildable: False
type: exitcode-stdio-1.0
main-is: CreateUserTest.hs
-- see note in 'Test-Suite HighLevelTest'
build-tool-depends: hackage-server:hackage-server
-- NOTE: lib-server is not a real dependency; it's only used to inherit version constraints
build-depends:
-- version constraints inherited from lib-server
, HTTP
, base64-bytestring
, random
-- component-specific dependencies
, xml ^>= 1.3.14
test-suite PackageTests
import: test-defaults
type: exitcode-stdio-1.0
main-is: PackageTestMain.hs
other-modules: Distribution.Server.Packages.UnpackTest
build-depends:
-- version constraints inherited from lib-server
-- component-specific dependencies
, tasty ^>= 1.2.1
, tasty-hunit ^>= 0.10
, HUnit ^>= 1.6
test-suite HashTests
import: test-defaults
type: exitcode-stdio-1.0
main-is: HashTestMain.hs
build-depends:
-- version constraints inherited from lib-server
, base16-bytestring
, cereal
, cryptohash-md5
, cryptohash-sha256
, safecopy
-- component-specific dependencies
, tasty ^>= 1.2.1
, tasty-hunit ^>= 0.10