cabal-install.cabal 29.9 KB
Newer Older
1
Name:               cabal-install
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
2
Version:            2.5.0.0
3
Synopsis:           The command-line interface for Cabal and Hackage.
4
Description:
5 6 7
    The \'cabal\' command-line program simplifies the process of managing
    Haskell software by automating the fetching, configuration, compilation
    and installation of Haskell libraries and programs.
Edward Z. Yang's avatar
Edward Z. Yang committed
8 9 10
    .
    This package only provides an executable and cannot be used as a
    library (ignore the module listing below.)
11
homepage:           http://www.haskell.org/cabal/
12
bug-reports:        https://github.com/haskell/cabal/issues
13 14
License:            BSD3
License-File:       LICENSE
15
Author:             Cabal Development Team (see AUTHORS file)
16
Maintainer:         Cabal Development Team <cabal-devel@haskell.org>
17
Copyright:          2003-2018, Cabal Development Team
18
Category:           Distribution
lspitzner's avatar
lspitzner committed
19
Build-type:         Custom
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
20
Cabal-Version:      >= 1.10
barmston's avatar
barmston committed
21 22
Extra-Source-Files:
  README.md bash-completion/cabal bootstrap.sh changelog
23
  tests/README.md
barmston's avatar
barmston committed
24

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
25
  -- Generated with 'make gen-extra-source-files'
26 27
  -- Do NOT edit this section manually; instead, run the script.
  -- BEGIN gen-extra-source-files
28 29 30 31 32
  tests/IntegrationTests2/build/keep-going/cabal.project
  tests/IntegrationTests2/build/keep-going/p/P.hs
  tests/IntegrationTests2/build/keep-going/p/p.cabal
  tests/IntegrationTests2/build/keep-going/q/Q.hs
  tests/IntegrationTests2/build/keep-going/q/q.cabal
33 34 35
  tests/IntegrationTests2/build/local-tarball/cabal.project
  tests/IntegrationTests2/build/local-tarball/q/Q.hs
  tests/IntegrationTests2/build/local-tarball/q/q.cabal
36 37 38 39 40 41 42 43 44
  tests/IntegrationTests2/build/setup-custom1/A.hs
  tests/IntegrationTests2/build/setup-custom1/Setup.hs
  tests/IntegrationTests2/build/setup-custom1/a.cabal
  tests/IntegrationTests2/build/setup-custom2/A.hs
  tests/IntegrationTests2/build/setup-custom2/Setup.hs
  tests/IntegrationTests2/build/setup-custom2/a.cabal
  tests/IntegrationTests2/build/setup-simple/A.hs
  tests/IntegrationTests2/build/setup-simple/Setup.hs
  tests/IntegrationTests2/build/setup-simple/a.cabal
45
  tests/IntegrationTests2/exception/bad-config/cabal.project
46 47 48 49 50
  tests/IntegrationTests2/exception/build/Main.hs
  tests/IntegrationTests2/exception/build/a.cabal
  tests/IntegrationTests2/exception/configure/a.cabal
  tests/IntegrationTests2/exception/no-pkg/empty.in
  tests/IntegrationTests2/exception/no-pkg2/cabal.project
51 52 53 54 55
  tests/IntegrationTests2/regression/3324/cabal.project
  tests/IntegrationTests2/regression/3324/p/P.hs
  tests/IntegrationTests2/regression/3324/p/p.cabal
  tests/IntegrationTests2/regression/3324/q/Q.hs
  tests/IntegrationTests2/regression/3324/q/q.cabal
56 57 58 59 60
  tests/IntegrationTests2/targets/all-disabled/cabal.project
  tests/IntegrationTests2/targets/all-disabled/p.cabal
  tests/IntegrationTests2/targets/benchmarks-disabled/cabal.project
  tests/IntegrationTests2/targets/benchmarks-disabled/p.cabal
  tests/IntegrationTests2/targets/benchmarks-disabled/q/q.cabal
61 62 63
  tests/IntegrationTests2/targets/complex/cabal.project
  tests/IntegrationTests2/targets/complex/q/Q.hs
  tests/IntegrationTests2/targets/complex/q/q.cabal
64 65
  tests/IntegrationTests2/targets/empty-pkg/cabal.project
  tests/IntegrationTests2/targets/empty-pkg/p.cabal
66 67
  tests/IntegrationTests2/targets/empty/cabal.project
  tests/IntegrationTests2/targets/empty/foo.hs
68 69 70
  tests/IntegrationTests2/targets/exes-disabled/cabal.project
  tests/IntegrationTests2/targets/exes-disabled/p/p.cabal
  tests/IntegrationTests2/targets/exes-disabled/q/q.cabal
71
  tests/IntegrationTests2/targets/lib-only/p.cabal
72 73 74 75 76 77 78 79 80 81
  tests/IntegrationTests2/targets/libs-disabled/cabal.project
  tests/IntegrationTests2/targets/libs-disabled/p/p.cabal
  tests/IntegrationTests2/targets/libs-disabled/q/q.cabal
  tests/IntegrationTests2/targets/multiple-exes/cabal.project
  tests/IntegrationTests2/targets/multiple-exes/p.cabal
  tests/IntegrationTests2/targets/multiple-libs/cabal.project
  tests/IntegrationTests2/targets/multiple-libs/p/p.cabal
  tests/IntegrationTests2/targets/multiple-libs/q/q.cabal
  tests/IntegrationTests2/targets/multiple-tests/cabal.project
  tests/IntegrationTests2/targets/multiple-tests/p.cabal
82 83 84
  tests/IntegrationTests2/targets/simple/P.hs
  tests/IntegrationTests2/targets/simple/cabal.project
  tests/IntegrationTests2/targets/simple/p.cabal
85
  tests/IntegrationTests2/targets/simple/q/QQ.hs
86
  tests/IntegrationTests2/targets/simple/q/q.cabal
87 88 89 90 91 92
  tests/IntegrationTests2/targets/test-only/p.cabal
  tests/IntegrationTests2/targets/tests-disabled/cabal.project
  tests/IntegrationTests2/targets/tests-disabled/p.cabal
  tests/IntegrationTests2/targets/tests-disabled/q/q.cabal
  tests/IntegrationTests2/targets/variety/cabal.project
  tests/IntegrationTests2/targets/variety/p.cabal
93
  -- END gen-extra-source-files
Duncan Coutts's avatar
Duncan Coutts committed
94

95 96 97 98
  -- Additional manual extra-source-files:
  tests/IntegrationTests2/build/local-tarball/p-0.1.tar.gz


Duncan Coutts's avatar
Duncan Coutts committed
99
source-repository head
100 101
  type:     git
  location: https://github.com/haskell/cabal/
Duncan Coutts's avatar
Duncan Coutts committed
102
  subdir:   cabal-install
103

104 105
Flag native-dns
  description:  Enable use of the [resolv](https://hackage.haskell.org/package/resolv) & [windns](https://hackage.haskell.org/package/windns) packages for performing DNS lookups
106
  default:      True
107 108
  manual:       True

109
Flag debug-expensive-assertions
110 111 112 113
  description:  Enable expensive assertions for testing or debugging
  default:      False
  manual:       True

114 115 116
Flag debug-conflict-sets
  description:  Add additional information to ConflictSets
  default:      False
kristenk's avatar
kristenk committed
117
  manual:       True
118

Edsko de Vries's avatar
Edsko de Vries committed
119 120 121
Flag debug-tracetree
  description:  Compile in support for tracetree (used to debug the solver)
  default:      False
kristenk's avatar
kristenk committed
122
  manual:       True
Edsko de Vries's avatar
Edsko de Vries committed
123

Edward Z. Yang's avatar
Edward Z. Yang committed
124 125
flag lib
  description:  Build cabal-install as a library. Please only use this if you are a cabal-install developer.
126
  Default:      False
Edward Z. Yang's avatar
Edward Z. Yang committed
127 128
  manual:       True

129 130 131 132 133 134 135 136
-- Build everything (including the test binaries) as a single static binary
-- instead of 5 discrete binaries.
-- This is useful for CI where we build our binaries on one machine, and then
-- ship them to another machine for testing.  Since the test binaries are
-- statically linked (making deployment easier), if we build five executables,
-- that means we need to ship ALL 5 binaries (with 5 versions of all the
-- statically linked libraries) to the test machines. This reduces that to one
-- binary and one set of linked libraries.
137 138 139 140 141
flag monolithic
  description:  Build cabal-install also with all of its test and support code.  Used by our continuous integration.
  default:      False
  manual:       True

Edward Z. Yang's avatar
Edward Z. Yang committed
142 143
library
    ghc-options:    -Wall -fwarn-tabs
144
    if impl(ghc >= 8.0)
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
145 146 147
        ghc-options: -Wcompat
                     -Wnoncanonical-monad-instances
                     -Wnoncanonical-monadfail-instances
148

Edward Z. Yang's avatar
Edward Z. Yang committed
149
    exposed-modules:
Duncan Coutts's avatar
Duncan Coutts committed
150 151
        Distribution.Client.BuildReports.Anonymous
        Distribution.Client.BuildReports.Storage
Duncan Coutts's avatar
Duncan Coutts committed
152
        Distribution.Client.BuildReports.Types
Duncan Coutts's avatar
Duncan Coutts committed
153
        Distribution.Client.BuildReports.Upload
154
        Distribution.Client.Check
155
        Distribution.Client.CmdBench
156
        Distribution.Client.CmdBuild
157
        Distribution.Client.CmdClean
158
        Distribution.Client.CmdConfigure
Moritz Angermann's avatar
Moritz Angermann committed
159
        Distribution.Client.CmdUpdate
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
160
        Distribution.Client.CmdErrorMessages
161
        Distribution.Client.CmdExec
Duncan Coutts's avatar
Duncan Coutts committed
162
        Distribution.Client.CmdFreeze
Ben Gamari's avatar
Ben Gamari committed
163
        Distribution.Client.CmdHaddock
Francesco Gazzetta's avatar
Francesco Gazzetta committed
164
        Distribution.Client.CmdInstall
165
        Distribution.Client.CmdRepl
166 167
        Distribution.Client.CmdRun
        Distribution.Client.CmdTest
168
        Distribution.Client.CmdLegacy
Alexis Williams's avatar
Alexis Williams committed
169
        Distribution.Client.CmdSdist
170
        Distribution.Client.Compat.Directory
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
171 172 173 174 175 176
        Distribution.Client.Compat.ExecutablePath
        Distribution.Client.Compat.FileLock
        Distribution.Client.Compat.FilePerms
        Distribution.Client.Compat.Prelude
        Distribution.Client.Compat.Process
        Distribution.Client.Compat.Semaphore
177
        Distribution.Client.Config
Duncan Coutts's avatar
Duncan Coutts committed
178
        Distribution.Client.Configure
179 180
        Distribution.Client.Dependency
        Distribution.Client.Dependency.Types
Duncan Coutts's avatar
Duncan Coutts committed
181
        Distribution.Client.DistDirLayout
barmston's avatar
barmston committed
182
        Distribution.Client.Exec
183
        Distribution.Client.Fetch
Duncan Coutts's avatar
Duncan Coutts committed
184
        Distribution.Client.FetchUtils
185
        Distribution.Client.FileMonitor
186
        Distribution.Client.Freeze
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
187
        Distribution.Client.GZipUtils
188
        Distribution.Client.GenBounds
189
        Distribution.Client.Get
190
        Distribution.Client.Glob
191
        Distribution.Client.GlobalFlags
192
        Distribution.Client.Haddock
193 194
        Distribution.Client.HttpUtils
        Distribution.Client.IndexUtils
195
        Distribution.Client.IndexUtils.Timestamp
196 197 198 199
        Distribution.Client.Init
        Distribution.Client.Init.Heuristics
        Distribution.Client.Init.Licenses
        Distribution.Client.Init.Types
200 201
        Distribution.Client.Install
        Distribution.Client.InstallPlan
202
        Distribution.Client.InstallSymlink
203
        Distribution.Client.JobControl
204
        Distribution.Client.List
Maciek Makowski's avatar
Maciek Makowski committed
205
        Distribution.Client.Manpage
ttuegel's avatar
ttuegel committed
206
        Distribution.Client.Nix
207
        Distribution.Client.Outdated
Duncan Coutts's avatar
Duncan Coutts committed
208
        Distribution.Client.PackageHash
209
        Distribution.Client.PackageUtils
210
        Distribution.Client.ParseUtils
Duncan Coutts's avatar
Duncan Coutts committed
211
        Distribution.Client.ProjectBuilding
212
        Distribution.Client.ProjectBuilding.Types
213 214
        Distribution.Client.ProjectConfig
        Distribution.Client.ProjectConfig.Legacy
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
215
        Distribution.Client.ProjectConfig.Types
216
        Distribution.Client.ProjectOrchestration
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
217
        Distribution.Client.ProjectPlanOutput
Duncan Coutts's avatar
Duncan Coutts committed
218
        Distribution.Client.ProjectPlanning
219
        Distribution.Client.ProjectPlanning.Types
220
        Distribution.Client.RebuildMonad
ttuegel's avatar
ttuegel committed
221 222
        Distribution.Client.Reconfigure
        Distribution.Client.Run
223
        Distribution.Client.Sandbox
224 225
        Distribution.Client.Sandbox.Index
        Distribution.Client.Sandbox.PackageEnvironment
226
        Distribution.Client.Sandbox.Timestamp
227
        Distribution.Client.Sandbox.Types
ttuegel's avatar
ttuegel committed
228
        Distribution.Client.SavedFlags
229
        Distribution.Client.Security.DNS
Edsko de Vries's avatar
Edsko de Vries committed
230
        Distribution.Client.Security.HTTP
231 232
        Distribution.Client.Setup
        Distribution.Client.SetupWrapper
233
        Distribution.Client.SolverInstallPlan
234
        Distribution.Client.SourceFiles
235
        Distribution.Client.SourceRepoParse
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
236
        Distribution.Client.SrcDist
237
        Distribution.Client.Store
238
        Distribution.Client.Tar
239
        Distribution.Client.TargetSelector
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
240
        Distribution.Client.Targets
241 242 243 244
        Distribution.Client.Types
        Distribution.Client.Update
        Distribution.Client.Upload
        Distribution.Client.Utils
245
        Distribution.Client.Utils.Assertion
246
        Distribution.Client.Utils.Json
Duncan Coutts's avatar
Duncan Coutts committed
247
        Distribution.Client.VCS
248
        Distribution.Client.Win32SelfUpgrade
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
249
        Distribution.Client.World
250
        Distribution.Solver.Compat.Prelude
251 252 253 254 255 256 257 258 259 260 261 262 263
        Distribution.Solver.Modular
        Distribution.Solver.Modular.Assignment
        Distribution.Solver.Modular.Builder
        Distribution.Solver.Modular.Configured
        Distribution.Solver.Modular.ConfiguredConversion
        Distribution.Solver.Modular.ConflictSet
        Distribution.Solver.Modular.Cycles
        Distribution.Solver.Modular.Dependency
        Distribution.Solver.Modular.Explore
        Distribution.Solver.Modular.Flag
        Distribution.Solver.Modular.Index
        Distribution.Solver.Modular.IndexConversion
        Distribution.Solver.Modular.LabeledGraph
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
264
        Distribution.Solver.Modular.Linking
265 266
        Distribution.Solver.Modular.Log
        Distribution.Solver.Modular.Message
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
267
        Distribution.Solver.Modular.PSQ
268 269
        Distribution.Solver.Modular.Package
        Distribution.Solver.Modular.Preference
270
        Distribution.Solver.Modular.RetryLog
271 272 273 274 275
        Distribution.Solver.Modular.Solver
        Distribution.Solver.Modular.Tree
        Distribution.Solver.Modular.Validate
        Distribution.Solver.Modular.Var
        Distribution.Solver.Modular.Version
276
        Distribution.Solver.Modular.WeightedPSQ
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
        Distribution.Solver.Types.ComponentDeps
        Distribution.Solver.Types.ConstraintSource
        Distribution.Solver.Types.DependencyResolver
        Distribution.Solver.Types.Flag
        Distribution.Solver.Types.InstSolverPackage
        Distribution.Solver.Types.InstalledPreference
        Distribution.Solver.Types.LabeledPackageConstraint
        Distribution.Solver.Types.OptionalStanza
        Distribution.Solver.Types.PackageConstraint
        Distribution.Solver.Types.PackageFixedDeps
        Distribution.Solver.Types.PackageIndex
        Distribution.Solver.Types.PackagePath
        Distribution.Solver.Types.PackagePreferences
        Distribution.Solver.Types.PkgConfigDb
        Distribution.Solver.Types.Progress
        Distribution.Solver.Types.ResolverPackage
        Distribution.Solver.Types.Settings
        Distribution.Solver.Types.SolverId
        Distribution.Solver.Types.SolverPackage
        Distribution.Solver.Types.SourcePackage
        Distribution.Solver.Types.Variable
298
        Paths_cabal_install
299

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
300 301
    -- NOTE: when updating build-depends, don't forget to update version regexps
    -- in bootstrap.sh.
Ben Millwood's avatar
Ben Millwood committed
302
    build-depends:
Duncan Coutts's avatar
Duncan Coutts committed
303
        async      >= 2.0      && < 3,
304
        array      >= 0.4      && < 0.6,
305
        base       >= 4.6      && < 5,
306
        base16-bytestring >= 0.1.1 && < 0.2,
307 308
        binary     >= 0.7      && < 0.9,
        bytestring >= 0.10.2   && < 1,
309
        Cabal      == 2.5.*,
310
        containers >= 0.5      && < 0.7,
311
        cryptohash-sha256 >= 0.11 && < 0.12,
312
        deepseq    >= 1.3      && < 1.5,
313
        directory  >= 1.2.2.0  && < 1.4,
Ryan Scott's avatar
Ryan Scott committed
314
        echo       >= 0.1.3    && < 0.2,
315
        edit-distance >= 0.2.2 && < 0.3,
316
        filepath   >= 1.3      && < 1.5,
317
        hashable   >= 1.0      && < 2,
318
        HTTP       >= 4000.1.5 && < 4000.4,
Ben Millwood's avatar
Ben Millwood committed
319
        mtl        >= 2.0      && < 3,
320
        network-uri >= 2.6.0.2 && < 2.7,
Felix Yan's avatar
Felix Yan committed
321
        network    >= 2.6      && < 2.8,
322
        pretty     >= 1.1      && < 1.2,
323
        process    >= 1.1.0.2  && < 1.7,
dsf's avatar
dsf committed
324
        random     >= 1        && < 1.2,
Ben Millwood's avatar
Ben Millwood committed
325
        stm        >= 2.0      && < 3,
326
        tar        >= 0.5.0.3  && < 0.6,
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
327
        time       >= 1.4      && < 1.10,
Edsko de Vries's avatar
Edsko de Vries committed
328
        zlib       >= 0.5.3    && < 0.7,
329
        hackage-security >= 0.5.2.2 && < 0.6,
Alexis Williams's avatar
Alexis Williams committed
330 331
        text       >= 1.2.3    && < 1.3,
        zip-archive >= 0.3.2.5 && < 0.4
332

333 334 335 336 337
    if flag(native-dns)
      if os(windows)
        build-depends: windns      >= 0.1.0 && < 0.2
      else
        build-depends: resolv      >= 0.1.1 && < 0.2
338

339
    if os(windows)
340
      build-depends: Win32 >= 2 && < 3
341
    else
Ryan Scott's avatar
Ryan Scott committed
342
      build-depends: unix >= 2.5 && < 2.9
343

344 345
    if flag(debug-expensive-assertions)
      cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS
346

347 348 349 350
    if flag(debug-conflict-sets)
      cpp-options: -DDEBUG_CONFLICT_SETS
      build-depends: base >= 4.8

Edsko de Vries's avatar
Edsko de Vries committed
351 352 353 354
    if flag(debug-tracetree)
      cpp-options: -DDEBUG_TRACETREE
      build-depends: tracetree >= 0.1 && < 0.2

Edward Z. Yang's avatar
Edward Z. Yang committed
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
    if !flag(lib)
      buildable: False

    default-language: Haskell2010

executable cabal
    main-is:        Main.hs
    hs-source-dirs: main

    ghc-options:    -Wall -fwarn-tabs -rtsopts
    if impl(ghc >= 8.0)
        ghc-options: -Wcompat
                     -Wnoncanonical-monad-instances
                     -Wnoncanonical-monadfail-instances

370 371
    other-modules: Paths_cabal_install

Edward Z. Yang's avatar
Edward Z. Yang committed
372 373 374
    if flag(lib)
        build-depends:
            cabal-install,
375
            Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
376 377 378 379 380 381 382 383 384 385
            base,
            directory,
            filepath
    else
        hs-source-dirs: .
        build-depends:
            async      >= 2.0      && < 3,
            array      >= 0.4      && < 0.6,
            base       >= 4.5      && < 5,
            base16-bytestring >= 0.1.1 && < 0.2,
386 387
            binary     >= 0.7      && < 0.9,
            bytestring >= 0.10.2   && < 1,
388
            Cabal      == 2.5.*,
389
            containers >= 0.5      && < 0.7,
Edward Z. Yang's avatar
Edward Z. Yang committed
390 391
            cryptohash-sha256 >= 0.11 && < 0.12,
            deepseq    >= 1.3      && < 1.5,
392
            directory  >= 1.2.2.0  && < 1.4,
Edward Z. Yang's avatar
Edward Z. Yang committed
393 394 395 396 397 398
            echo       >= 0.1.3    && < 0.2,
            edit-distance >= 0.2.2 && < 0.3,
            filepath   >= 1.3      && < 1.5,
            hashable   >= 1.0      && < 2,
            HTTP       >= 4000.1.5 && < 4000.4,
            mtl        >= 2.0      && < 3,
Felix Yan's avatar
Felix Yan committed
399
            network    >= 2.6      && < 2.8,
400
            network-uri >= 2.6     && < 2.7,
Edward Z. Yang's avatar
Edward Z. Yang committed
401
            pretty     >= 1.1      && < 1.2,
402
            process    >= 1.2      && < 1.7,
Edward Z. Yang's avatar
Edward Z. Yang committed
403 404 405
            random     >= 1        && < 1.2,
            stm        >= 2.0      && < 3,
            tar        >= 0.5.0.3  && < 0.6,
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
406
            time       >= 1.4      && < 1.10,
Edward Z. Yang's avatar
Edward Z. Yang committed
407
            zlib       >= 0.5.3    && < 0.7,
408
            hackage-security >= 0.5.2.2 && < 0.6,
Alexis Williams's avatar
Alexis Williams committed
409 410
            text       >= 1.2.3    && < 1.3,
            zip-archive >= 0.3.2.5 && < 0.4
Edward Z. Yang's avatar
Edward Z. Yang committed
411

412 413 414 415 416 417 418 419
        other-modules:
            Distribution.Client.BuildReports.Anonymous
            Distribution.Client.BuildReports.Storage
            Distribution.Client.BuildReports.Types
            Distribution.Client.BuildReports.Upload
            Distribution.Client.Check
            Distribution.Client.CmdBench
            Distribution.Client.CmdBuild
Alexis Williams's avatar
Alexis Williams committed
420
            Distribution.Client.CmdClean
421
            Distribution.Client.CmdConfigure
Moritz Angermann's avatar
Moritz Angermann committed
422
            Distribution.Client.CmdUpdate
423
            Distribution.Client.CmdErrorMessages
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
424
            Distribution.Client.CmdExec
425 426
            Distribution.Client.CmdFreeze
            Distribution.Client.CmdHaddock
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
427
            Distribution.Client.CmdInstall
428
            Distribution.Client.CmdLegacy
429 430 431
            Distribution.Client.CmdRepl
            Distribution.Client.CmdRun
            Distribution.Client.CmdTest
Alexis Williams's avatar
Alexis Williams committed
432
            Distribution.Client.CmdSdist
433
            Distribution.Client.Compat.Directory
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
            Distribution.Client.Compat.ExecutablePath
            Distribution.Client.Compat.FileLock
            Distribution.Client.Compat.FilePerms
            Distribution.Client.Compat.Prelude
            Distribution.Client.Compat.Process
            Distribution.Client.Compat.Semaphore
            Distribution.Client.Config
            Distribution.Client.Configure
            Distribution.Client.Dependency
            Distribution.Client.Dependency.Types
            Distribution.Client.DistDirLayout
            Distribution.Client.Exec
            Distribution.Client.Fetch
            Distribution.Client.FetchUtils
            Distribution.Client.FileMonitor
            Distribution.Client.Freeze
            Distribution.Client.GZipUtils
            Distribution.Client.GenBounds
            Distribution.Client.Get
            Distribution.Client.Glob
            Distribution.Client.GlobalFlags
            Distribution.Client.Haddock
            Distribution.Client.HttpUtils
            Distribution.Client.IndexUtils
            Distribution.Client.IndexUtils.Timestamp
            Distribution.Client.Init
            Distribution.Client.Init.Heuristics
            Distribution.Client.Init.Licenses
            Distribution.Client.Init.Types
            Distribution.Client.Install
            Distribution.Client.InstallPlan
            Distribution.Client.InstallSymlink
            Distribution.Client.JobControl
            Distribution.Client.List
            Distribution.Client.Manpage
            Distribution.Client.Nix
            Distribution.Client.Outdated
            Distribution.Client.PackageHash
            Distribution.Client.PackageUtils
            Distribution.Client.ParseUtils
            Distribution.Client.ProjectBuilding
            Distribution.Client.ProjectBuilding.Types
            Distribution.Client.ProjectConfig
            Distribution.Client.ProjectConfig.Legacy
            Distribution.Client.ProjectConfig.Types
            Distribution.Client.ProjectOrchestration
            Distribution.Client.ProjectPlanOutput
            Distribution.Client.ProjectPlanning
            Distribution.Client.ProjectPlanning.Types
            Distribution.Client.RebuildMonad
            Distribution.Client.Reconfigure
            Distribution.Client.Run
            Distribution.Client.Sandbox
            Distribution.Client.Sandbox.Index
            Distribution.Client.Sandbox.PackageEnvironment
            Distribution.Client.Sandbox.Timestamp
            Distribution.Client.Sandbox.Types
            Distribution.Client.SavedFlags
            Distribution.Client.Security.DNS
            Distribution.Client.Security.HTTP
            Distribution.Client.Setup
            Distribution.Client.SetupWrapper
            Distribution.Client.SolverInstallPlan
            Distribution.Client.SourceFiles
498
            Distribution.Client.SourceRepoParse
499 500 501 502 503 504 505 506 507 508 509
            Distribution.Client.SrcDist
            Distribution.Client.Store
            Distribution.Client.Tar
            Distribution.Client.TargetSelector
            Distribution.Client.Targets
            Distribution.Client.Types
            Distribution.Client.Update
            Distribution.Client.Upload
            Distribution.Client.Utils
            Distribution.Client.Utils.Assertion
            Distribution.Client.Utils.Json
Duncan Coutts's avatar
Duncan Coutts committed
510
            Distribution.Client.VCS
511 512
            Distribution.Client.Win32SelfUpgrade
            Distribution.Client.World
513
            Distribution.Solver.Compat.Prelude
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 554 555 556 557 558 559 560
            Distribution.Solver.Modular
            Distribution.Solver.Modular.Assignment
            Distribution.Solver.Modular.Builder
            Distribution.Solver.Modular.Configured
            Distribution.Solver.Modular.ConfiguredConversion
            Distribution.Solver.Modular.ConflictSet
            Distribution.Solver.Modular.Cycles
            Distribution.Solver.Modular.Dependency
            Distribution.Solver.Modular.Explore
            Distribution.Solver.Modular.Flag
            Distribution.Solver.Modular.Index
            Distribution.Solver.Modular.IndexConversion
            Distribution.Solver.Modular.LabeledGraph
            Distribution.Solver.Modular.Linking
            Distribution.Solver.Modular.Log
            Distribution.Solver.Modular.Message
            Distribution.Solver.Modular.PSQ
            Distribution.Solver.Modular.Package
            Distribution.Solver.Modular.Preference
            Distribution.Solver.Modular.RetryLog
            Distribution.Solver.Modular.Solver
            Distribution.Solver.Modular.Tree
            Distribution.Solver.Modular.Validate
            Distribution.Solver.Modular.Var
            Distribution.Solver.Modular.Version
            Distribution.Solver.Modular.WeightedPSQ
            Distribution.Solver.Types.ComponentDeps
            Distribution.Solver.Types.ConstraintSource
            Distribution.Solver.Types.DependencyResolver
            Distribution.Solver.Types.Flag
            Distribution.Solver.Types.InstSolverPackage
            Distribution.Solver.Types.InstalledPreference
            Distribution.Solver.Types.LabeledPackageConstraint
            Distribution.Solver.Types.OptionalStanza
            Distribution.Solver.Types.PackageConstraint
            Distribution.Solver.Types.PackageFixedDeps
            Distribution.Solver.Types.PackageIndex
            Distribution.Solver.Types.PackagePath
            Distribution.Solver.Types.PackagePreferences
            Distribution.Solver.Types.PkgConfigDb
            Distribution.Solver.Types.Progress
            Distribution.Solver.Types.ResolverPackage
            Distribution.Solver.Types.Settings
            Distribution.Solver.Types.SolverId
            Distribution.Solver.Types.SolverPackage
            Distribution.Solver.Types.SourcePackage
            Distribution.Solver.Types.Variable
561

562 563 564 565 566
        if flag(native-dns)
          if os(windows)
            build-depends: windns      >= 0.1.0 && < 0.2
          else
            build-depends: resolv      >= 0.1.1 && < 0.2
567

Edward Z. Yang's avatar
Edward Z. Yang committed
568 569 570
        if os(windows)
          build-depends: Win32 >= 2 && < 3
        else
Ryan Scott's avatar
Ryan Scott committed
571
          build-depends: unix >= 2.5 && < 2.9
Edward Z. Yang's avatar
Edward Z. Yang committed
572

573 574
        if flag(debug-expensive-assertions)
          cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS
575

Edward Z. Yang's avatar
Edward Z. Yang committed
576 577 578 579 580 581 582 583
        if flag(debug-conflict-sets)
          cpp-options: -DDEBUG_CONFLICT_SETS
          build-depends: base >= 4.8

        if flag(debug-tracetree)
          cpp-options: -DDEBUG_TRACETREE
          build-depends: tracetree >= 0.1 && < 0.2

584 585 586 587 588 589 590
    if flag(monolithic)
      hs-source-dirs: tests
      other-modules:
        UnitTests
        MemoryUsageTests
        SolverQuickCheck
        IntegrationTests2
591 592 593

        UnitTests.Distribution.Client.ArbitraryInstances
        UnitTests.Distribution.Client.FileMonitor
594
        UnitTests.Distribution.Client.Get
595 596 597 598 599 600 601 602 603 604 605 606
        UnitTests.Distribution.Client.GZipUtils
        UnitTests.Distribution.Client.Glob
        UnitTests.Distribution.Client.IndexUtils.Timestamp
        UnitTests.Distribution.Client.InstallPlan
        UnitTests.Distribution.Client.JobControl
        UnitTests.Distribution.Client.ProjectConfig
        UnitTests.Distribution.Client.Sandbox
        UnitTests.Distribution.Client.Sandbox.Timestamp
        UnitTests.Distribution.Client.Store
        UnitTests.Distribution.Client.Tar
        UnitTests.Distribution.Client.Targets
        UnitTests.Distribution.Client.UserConfig
607
        UnitTests.Distribution.Client.VCS
608 609 610 611 612
        UnitTests.Distribution.Solver.Modular.Builder
        UnitTests.Distribution.Solver.Modular.DSL
        UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
        UnitTests.Distribution.Solver.Modular.MemoryUsage
        UnitTests.Distribution.Solver.Modular.QuickCheck
613
        UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
614 615 616 617
        UnitTests.Distribution.Solver.Modular.RetryLog
        UnitTests.Distribution.Solver.Modular.Solver
        UnitTests.Distribution.Solver.Modular.WeightedPSQ
        UnitTests.Options
618
        UnitTests.TempTestDir
619

620 621
      cpp-options: -DMONOLITHIC
      build-depends:
622
        Cabal      == 2.5.*,
623 624 625 626 627 628 629 630 631
        QuickCheck >= 2.8.2,
        array,
        async,
        bytestring,
        containers,
        deepseq,
        directory,
        edit-distance,
        filepath,
632
        hashable,
633 634 635
        mtl,
        network,
        network-uri,
636
        pretty-show >= 1.6.15,
637 638 639
        random,
        tagged,
        tar,
Oleg Grenrus's avatar
Oleg Grenrus committed
640
        tasty >= 1.1.0.3 && < 1.2,
641
        tasty-hunit >= 0.10,
642 643 644 645
        tasty-quickcheck,
        time,
        zlib

646
    ghc-options: -threaded
647

648 649 650
    -- On AIX, some legacy BSD operations such as flock(2) are provided by libbsd.a
    if os(aix)
      extra-libraries: bsd
Edward Z. Yang's avatar
Edward Z. Yang committed
651

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
652
    default-language: Haskell2010
653

barmston's avatar
barmston committed
654
-- Small, fast running tests.
655 656 657
Test-Suite unit-tests
  type: exitcode-stdio-1.0
  main-is: UnitTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
658
  hs-source-dirs: tests
659
  ghc-options: -Wall -fwarn-tabs -main-is UnitTests
660
  other-modules:
661
    UnitTests.Distribution.Client.ArbitraryInstances
662
    UnitTests.Distribution.Client.Targets
Duncan Coutts's avatar
Duncan Coutts committed
663
    UnitTests.Distribution.Client.FileMonitor
664
    UnitTests.Distribution.Client.Get
665
    UnitTests.Distribution.Client.Glob
666
    UnitTests.Distribution.Client.GZipUtils
667
    UnitTests.Distribution.Client.Sandbox
668
    UnitTests.Distribution.Client.Sandbox.Timestamp
669
    UnitTests.Distribution.Client.Store
670
    UnitTests.Distribution.Client.Tar
671
    UnitTests.Distribution.Client.UserConfig
672
    UnitTests.Distribution.Client.ProjectConfig
673
    UnitTests.Distribution.Client.JobControl
674
    UnitTests.Distribution.Client.IndexUtils.Timestamp
675
    UnitTests.Distribution.Client.InstallPlan
676
    UnitTests.Distribution.Client.VCS
kristenk's avatar
kristenk committed
677
    UnitTests.Distribution.Solver.Modular.Builder
678
    UnitTests.Distribution.Solver.Modular.RetryLog
679 680
    UnitTests.Distribution.Solver.Modular.Solver
    UnitTests.Distribution.Solver.Modular.DSL
681
    UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
kristenk's avatar
kristenk committed
682
    UnitTests.Distribution.Solver.Modular.WeightedPSQ
683
    UnitTests.Options
684
    UnitTests.TempTestDir
685
  build-depends:
Edward Z. Yang's avatar
Edward Z. Yang committed
686
        array,
687
        base,
Duncan Coutts's avatar
Duncan Coutts committed
688
        async,
689
        bytestring,
Edward Z. Yang's avatar
Edward Z. Yang committed
690
        cabal-install,
691 692
        Cabal,
        containers,
693
        deepseq,
694
        mtl,
Edward Z. Yang's avatar
Edward Z. Yang committed
695
        random,
696
        directory,
697
        filepath,
Duncan Coutts's avatar
Duncan Coutts committed
698
        tar,
699 700
        time,
        zlib,
Edward Z. Yang's avatar
Edward Z. Yang committed
701 702
        network-uri,
        network,
Oleg Grenrus's avatar
Oleg Grenrus committed
703
        tasty >= 1.1.0.3 && < 1.2,
704
        tasty-hunit >= 0.10,
705
        tasty-quickcheck,
Edsko de Vries's avatar
Edsko de Vries committed
706
        tagged,
707
        QuickCheck >= 2.8.2
708

709
  ghc-options: -threaded
710

Edward Z. Yang's avatar
Edward Z. Yang committed
711 712
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
713

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
714
  default-language: Haskell2010
barmston's avatar
barmston committed
715

716
-- Tests to run with a limited stack and heap size
717 718 719
Test-Suite memory-usage-tests
  type: exitcode-stdio-1.0
  main-is: MemoryUsageTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
720
  hs-source-dirs: tests
721
  ghc-options: -Wall -fwarn-tabs "-with-rtsopts=-M4M -K1K" -main-is MemoryUsageTests
722 723 724 725 726 727 728 729 730
  other-modules:
    UnitTests.Distribution.Solver.Modular.DSL
    UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
    UnitTests.Distribution.Solver.Modular.MemoryUsage
    UnitTests.Options
  build-depends:
        base,
        async,
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
731
        cabal-install,
732 733 734
        containers,
        deepseq,
        tagged,
Oleg Grenrus's avatar
Oleg Grenrus committed
735
        tasty >= 1.1.0.3 && < 1.2,
736
        tasty-hunit >= 0.10
737

738
  ghc-options: -threaded
739

Edward Z. Yang's avatar
Edward Z. Yang committed
740 741
  if !flag(lib)
    buildable: False
742 743 744

  default-language: Haskell2010

745 746 747 748
-- Slow solver tests
Test-Suite solver-quickcheck
  type: exitcode-stdio-1.0
  main-is: SolverQuickCheck.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
749
  hs-source-dirs: tests
750
  ghc-options: -Wall -fwarn-tabs -main-is SolverQuickCheck
751
  other-modules:
752 753
    UnitTests.Distribution.Solver.Modular.DSL
    UnitTests.Distribution.Solver.Modular.QuickCheck
754
    UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
755 756
  build-depends:
        base,
Duncan Coutts's avatar
Duncan Coutts committed
757
        async,
758
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
759
        cabal-install,
760
        containers,
761
        deepseq >= 1.2,
762
        hashable,
763 764
        random,
        tagged,
Oleg Grenrus's avatar
Oleg Grenrus committed
765
        tasty >= 1.1.0.3 && <1.2,
766 767
        tasty-quickcheck,
        QuickCheck >= 2.8.2,
768
        pretty-show >= 1.6.15
769

770
  ghc-options: -threaded
771

Edward Z. Yang's avatar
Edward Z. Yang committed
772 773
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
774

775 776
  default-language: Haskell2010

777 778 779 780 781
-- Integration tests that use the cabal-install code directly
-- but still build whole projects
test-suite integration-tests2
  type: exitcode-stdio-1.0
  main-is: IntegrationTests2.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
782
  hs-source-dirs: tests
783
  ghc-options: -Wall -fwarn-tabs -main-is IntegrationTests2
784 785 786 787
  other-modules:
  build-depends:
        base,
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
788
        cabal-install,
789
        containers,
790
        deepseq,
791
        directory,
792
        edit-distance,
793
        filepath,
Oleg Grenrus's avatar
Oleg Grenrus committed
794
        tasty >= 1.1.0.3 && < 1.2,
795
        tasty-hunit >= 0.10,
796
        tagged
797

Edward Z. Yang's avatar
Edward Z. Yang committed
798 799
  if !flag(lib)
    buildable: False
800

801
  ghc-options: -threaded
802 803
  default-language: Haskell2010

804
custom-setup
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
805
  setup-depends: Cabal >= 2.2,
806
                 base,
Ben Gamari's avatar
Ben Gamari committed
807
                 process   >= 1.1.0.1  && < 1.7,
808
                 filepath  >= 1.3      && < 1.5