cabal-install.cabal 30.1 KB
Newer Older
1
Name:               cabal-install
2
Version:            2.1.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>
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
17
Copyright:          2003-2017, 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

25 26 27
  -- Generated with '../Cabal/misc/gen-extra-source-files.sh'
  -- 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 36 37 38 39 40 41
  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
42
  tests/IntegrationTests2/exception/bad-config/cabal.project
43 44 45 46 47
  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
48 49 50 51 52
  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
53 54 55 56 57
  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
58 59 60
  tests/IntegrationTests2/targets/complex/cabal.project
  tests/IntegrationTests2/targets/complex/q/Q.hs
  tests/IntegrationTests2/targets/complex/q/q.cabal
61 62
  tests/IntegrationTests2/targets/empty-pkg/cabal.project
  tests/IntegrationTests2/targets/empty-pkg/p.cabal
63 64
  tests/IntegrationTests2/targets/empty/cabal.project
  tests/IntegrationTests2/targets/empty/foo.hs
65 66 67 68 69 70 71 72 73 74 75 76 77
  tests/IntegrationTests2/targets/exes-disabled/cabal.project
  tests/IntegrationTests2/targets/exes-disabled/p/p.cabal
  tests/IntegrationTests2/targets/exes-disabled/q/q.cabal
  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
78 79 80
  tests/IntegrationTests2/targets/simple/P.hs
  tests/IntegrationTests2/targets/simple/cabal.project
  tests/IntegrationTests2/targets/simple/p.cabal
81
  tests/IntegrationTests2/targets/simple/q/QQ.hs
82
  tests/IntegrationTests2/targets/simple/q/q.cabal
83 84 85 86 87 88
  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
89
  -- END gen-extra-source-files
Duncan Coutts's avatar
Duncan Coutts committed
90 91

source-repository head
92 93
  type:     git
  location: https://github.com/haskell/cabal/
Duncan Coutts's avatar
Duncan Coutts committed
94
  subdir:   cabal-install
95

96 97 98 99
Flag old-bytestring
  description:  Use bytestring < 0.10.2 and bytestring-builder
  default: False

100 101 102 103
Flag old-directory
  description:  Use directory < 1.2 and old-time
  default:      False

104 105 106 107
Flag network-uri
  description:  Get Network.URI from the network-uri package
  default:      True

108 109 110 111 112
Flag resolv
  description:  Enable use of the [resolv](https://hackage.haskell.org/package/resolv) package for performing DNS lookups
  default:      False
  manual:       True

113
Flag debug-expensive-assertions
114 115 116 117
  description:  Enable expensive assertions for testing or debugging
  default:      False
  manual:       True

118 119 120
Flag debug-conflict-sets
  description:  Add additional information to ConflictSets
  default:      False
kristenk's avatar
kristenk committed
121
  manual:       True
122

Edsko de Vries's avatar
Edsko de Vries committed
123 124 125
Flag debug-tracetree
  description:  Compile in support for tracetree (used to debug the solver)
  default:      False
kristenk's avatar
kristenk committed
126
  manual:       True
Edsko de Vries's avatar
Edsko de Vries committed
127

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

133 134 135 136 137 138 139 140
-- 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.
141 142 143 144 145
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
146 147
library
    ghc-options:    -Wall -fwarn-tabs
148
    if impl(ghc >= 8.0)
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
149 150 151
        ghc-options: -Wcompat
                     -Wnoncanonical-monad-instances
                     -Wnoncanonical-monadfail-instances
152

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

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
297 298
    -- NOTE: when updating build-depends, don't forget to update version regexps
    -- in bootstrap.sh.
Ben Millwood's avatar
Ben Millwood committed
299
    build-depends:
Duncan Coutts's avatar
Duncan Coutts committed
300
        async      >= 2.0      && < 3,
301 302
        array      >= 0.4      && < 0.6,
        base       >= 4.5      && < 5,
303
        base16-bytestring >= 0.1.1 && < 0.2,
304
        binary     >= 0.5      && < 0.9,
Ben Millwood's avatar
Ben Millwood committed
305
        bytestring >= 0.9      && < 1,
306
        Cabal      >= 2.1      && < 2.2,
307
        containers >= 0.4      && < 0.6,
308
        cryptohash-sha256 >= 0.11 && < 0.12,
309
        deepseq    >= 1.3      && < 1.5,
Ryan Scott's avatar
Ryan Scott committed
310
        echo       >= 0.1.3    && < 0.2,
311
        edit-distance >= 0.2.2 && < 0.3,
312
        filepath   >= 1.3      && < 1.5,
313
        hashable   >= 1.0      && < 2,
314
        HTTP       >= 4000.1.5 && < 4000.4,
Ben Millwood's avatar
Ben Millwood committed
315
        mtl        >= 2.0      && < 3,
316
        pretty     >= 1.1      && < 1.2,
dsf's avatar
dsf committed
317
        random     >= 1        && < 1.2,
Ben Millwood's avatar
Ben Millwood committed
318
        stm        >= 2.0      && < 3,
319
        tar        >= 0.5.0.3  && < 0.6,
320
        time       >= 1.4      && < 1.9,
Edsko de Vries's avatar
Edsko de Vries committed
321
        zlib       >= 0.5.3    && < 0.7,
322
        hackage-security >= 0.5.2.2 && < 0.6
323

324 325 326 327 328
    if flag(old-bytestring)
      build-depends: bytestring <  0.10.2, bytestring-builder >= 0.10 && < 1
    else
      build-depends: bytestring >= 0.10.2

329
    if flag(old-directory)
330
      build-depends: directory >= 1.1 && < 1.2, old-time >= 1 && < 1.2,
331
                     process   >= 1.0.1.1  && < 1.1.0.2
332
    else
333
      build-depends: directory >= 1.2 && < 1.4,
Ben Gamari's avatar
Ben Gamari committed
334
                     process   >= 1.1.0.2  && < 1.7
335

336 337 338
    -- NOTE: you MUST include the network dependency even when network-uri
    -- is pulled in, otherwise the constraint solver doesn't have enough
    -- information
339
    if flag(network-uri)
340
      build-depends: network-uri >= 2.6 && < 2.7, network >= 2.6 && < 2.7
341
    else
tibbe's avatar
tibbe committed
342
      build-depends: network     >= 2.4 && < 2.6
343

344 345 346
    if flag(resolv)
      build-depends: resolv      >= 0.1.1 && < 0.2

347 348 349 350
    -- Needed for GHC.Generics before GHC 7.6
    if impl(ghc < 7.6)
      build-depends: ghc-prim >= 0.2 && < 0.3

351
    if os(windows)
352
      build-depends: Win32 >= 2 && < 3
353
    else
354
      build-depends: unix >= 2.5 && < 2.8
355

356 357
    if flag(debug-expensive-assertions)
      cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS
358

359 360 361 362
    if flag(debug-conflict-sets)
      cpp-options: -DDEBUG_CONFLICT_SETS
      build-depends: base >= 4.8

Edsko de Vries's avatar
Edsko de Vries committed
363 364 365 366
    if flag(debug-tracetree)
      cpp-options: -DDEBUG_TRACETREE
      build-depends: tracetree >= 0.1 && < 0.2

Edward Z. Yang's avatar
Edward Z. Yang committed
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
    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

382 383
    other-modules: Paths_cabal_install

Edward Z. Yang's avatar
Edward Z. Yang committed
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
    if flag(lib)
        build-depends:
            cabal-install,
            Cabal      >= 2.1      && < 2.2,
            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,
            binary     >= 0.5      && < 0.9,
            bytestring >= 0.9      && < 1,
            Cabal      >= 2.1      && < 2.2,
            containers >= 0.4      && < 0.6,
            cryptohash-sha256 >= 0.11 && < 0.12,
            deepseq    >= 1.3      && < 1.5,
            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,
            pretty     >= 1.1      && < 1.2,
            random     >= 1        && < 1.2,
            stm        >= 2.0      && < 3,
            tar        >= 0.5.0.3  && < 0.6,
414
            time       >= 1.4      && < 1.9,
Edward Z. Yang's avatar
Edward Z. Yang committed
415 416 417
            zlib       >= 0.5.3    && < 0.7,
            hackage-security >= 0.5.2.2 && < 0.6

418 419 420 421 422 423 424 425 426
        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
            Distribution.Client.CmdConfigure
Moritz Angermann's avatar
Moritz Angermann committed
427
            Distribution.Client.CmdUpdate
428
            Distribution.Client.CmdErrorMessages
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
429
            Distribution.Client.CmdExec
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
            Distribution.Client.CmdFreeze
            Distribution.Client.CmdHaddock
            Distribution.Client.CmdRepl
            Distribution.Client.CmdRun
            Distribution.Client.CmdTest
            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
            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
            Distribution.Client.Win32SelfUpgrade
            Distribution.Client.World
512
            Distribution.Solver.Compat.Prelude
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 554 555 556 557 558 559
            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
560

Edward Z. Yang's avatar
Edward Z. Yang committed
561 562 563 564 565 566 567 568 569 570
        if flag(old-bytestring)
          build-depends: bytestring <  0.10.2, bytestring-builder >= 0.10 && < 1
        else
          build-depends: bytestring >= 0.10.2

        if flag(old-directory)
          build-depends: directory >= 1.1 && < 1.2, old-time >= 1 && < 1.2,
                         process   >= 1.0.1.1  && < 1.1.0.2
        else
          build-depends: directory >= 1.2 && < 1.4,
571
                         process   >= 1.1.0.2  && < 1.7
Edward Z. Yang's avatar
Edward Z. Yang committed
572 573 574 575 576 577 578 579 580

        -- NOTE: you MUST include the network dependency even when network-uri
        -- is pulled in, otherwise the constraint solver doesn't have enough
        -- information
        if flag(network-uri)
          build-depends: network-uri >= 2.6 && < 2.7, network >= 2.6 && < 2.7
        else
          build-depends: network     >= 2.4 && < 2.6

581 582 583
        if flag(resolv)
          build-depends: resolv      >= 0.1 && < 0.2

Edward Z. Yang's avatar
Edward Z. Yang committed
584 585 586 587 588 589 590 591 592
        -- Needed for GHC.Generics before GHC 7.6
        if impl(ghc < 7.6)
          build-depends: ghc-prim >= 0.2 && < 0.3

        if os(windows)
          build-depends: Win32 >= 2 && < 3
        else
          build-depends: unix >= 2.5 && < 2.8

593 594
        if flag(debug-expensive-assertions)
          cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS
595

Edward Z. Yang's avatar
Edward Z. Yang committed
596 597 598 599 600 601 602 603
        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

604 605 606 607 608 609 610
    if flag(monolithic)
      hs-source-dirs: tests
      other-modules:
        UnitTests
        MemoryUsageTests
        SolverQuickCheck
        IntegrationTests2
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635

        UnitTests.Distribution.Client.ArbitraryInstances
        UnitTests.Distribution.Client.FileMonitor
        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
        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
        UnitTests.Distribution.Solver.Modular.RetryLog
        UnitTests.Distribution.Solver.Modular.Solver
        UnitTests.Distribution.Solver.Modular.WeightedPSQ
        UnitTests.Options

636 637 638 639 640 641 642 643 644 645 646 647
      cpp-options: -DMONOLITHIC
      build-depends:
        Cabal      >= 2.1 && < 2.2,
        QuickCheck >= 2.8.2,
        array,
        async,
        bytestring,
        containers,
        deepseq,
        directory,
        edit-distance,
        filepath,
648
        hashable,
649 650 651 652 653 654 655 656 657 658 659 660 661
        mtl,
        network,
        network-uri,
        pretty-show,
        random,
        tagged,
        tar,
        tasty,
        tasty-hunit,
        tasty-quickcheck,
        time,
        zlib

Edward Z. Yang's avatar
Edward Z. Yang committed
662 663
    if !(arch(arm) && impl(ghc < 7.6))
      ghc-options: -threaded
664

665 666 667
    -- 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
668

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
669
    default-language: Haskell2010
670

barmston's avatar
barmston committed
671
-- Small, fast running tests.
672 673 674
Test-Suite unit-tests
  type: exitcode-stdio-1.0
  main-is: UnitTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
675
  hs-source-dirs: tests
676
  ghc-options: -Wall -fwarn-tabs -main-is UnitTests
677
  other-modules:
678
    UnitTests.Distribution.Client.ArbitraryInstances
679
    UnitTests.Distribution.Client.Targets
Duncan Coutts's avatar
Duncan Coutts committed
680
    UnitTests.Distribution.Client.FileMonitor
681
    UnitTests.Distribution.Client.Glob
682
    UnitTests.Distribution.Client.GZipUtils
683
    UnitTests.Distribution.Client.Sandbox
684
    UnitTests.Distribution.Client.Sandbox.Timestamp
685
    UnitTests.Distribution.Client.Store
686
    UnitTests.Distribution.Client.Tar
687
    UnitTests.Distribution.Client.UserConfig
688
    UnitTests.Distribution.Client.ProjectConfig
689
    UnitTests.Distribution.Client.JobControl
690
    UnitTests.Distribution.Client.IndexUtils.Timestamp
691
    UnitTests.Distribution.Client.InstallPlan
kristenk's avatar
kristenk committed
692
    UnitTests.Distribution.Solver.Modular.Builder
693
    UnitTests.Distribution.Solver.Modular.RetryLog
694 695
    UnitTests.Distribution.Solver.Modular.Solver
    UnitTests.Distribution.Solver.Modular.DSL
696
    UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
kristenk's avatar
kristenk committed
697
    UnitTests.Distribution.Solver.Modular.WeightedPSQ
698
    UnitTests.Options
699
  build-depends:
Edward Z. Yang's avatar
Edward Z. Yang committed
700
        array,
701
        base,
Duncan Coutts's avatar
Duncan Coutts committed
702
        async,
703
        bytestring,
Edward Z. Yang's avatar
Edward Z. Yang committed
704
        cabal-install,
705 706
        Cabal,
        containers,
707
        deepseq,
708
        mtl,
Edward Z. Yang's avatar
Edward Z. Yang committed
709
        random,
710
        directory,
711
        filepath,
Duncan Coutts's avatar
Duncan Coutts committed
712
        tar,
713 714
        time,
        zlib,
Edward Z. Yang's avatar
Edward Z. Yang committed
715 716
        network-uri,
        network,
717 718 719
        tasty,
        tasty-hunit,
        tasty-quickcheck,
Edsko de Vries's avatar
Edsko de Vries committed
720
        tagged,
721
        QuickCheck >= 2.8.2
722

723
  if !(arch(arm) && impl(ghc < 7.6))
724
    ghc-options: -threaded
725

Edward Z. Yang's avatar
Edward Z. Yang committed
726 727
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
728

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
729
  default-language: Haskell2010
barmston's avatar
barmston committed
730

731
-- Tests to run with a limited stack and heap size
732 733 734
Test-Suite memory-usage-tests
  type: exitcode-stdio-1.0
  main-is: MemoryUsageTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
735
  hs-source-dirs: tests
736
  ghc-options: -Wall -fwarn-tabs "-with-rtsopts=-M4M -K1K" -main-is MemoryUsageTests
737 738 739 740 741 742 743 744 745
  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
746
        cabal-install,
747 748 749 750 751 752 753 754 755
        containers,
        deepseq,
        tagged,
        tasty,
        tasty-hunit

  if !(arch(arm) && impl(ghc < 7.6))
    ghc-options: -threaded

Edward Z. Yang's avatar
Edward Z. Yang committed
756 757
  if !flag(lib)
    buildable: False
758 759 760

  default-language: Haskell2010

761 762 763 764
-- 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
765
  hs-source-dirs: tests
766
  ghc-options: -Wall -fwarn-tabs -main-is SolverQuickCheck
767
  other-modules:
768 769
    UnitTests.Distribution.Solver.Modular.DSL
    UnitTests.Distribution.Solver.Modular.QuickCheck
770 771
  build-depends:
        base,
Duncan Coutts's avatar
Duncan Coutts committed
772
        async,
773
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
774
        cabal-install,
775
        containers,
776
        deepseq >= 1.2,
777
        hashable,
778 779 780 781 782
        tasty,
        tasty-quickcheck,
        QuickCheck >= 2.8.2,
        pretty-show

783
  if !(arch(arm) && impl(ghc < 7.6))
784
    ghc-options: -threaded
785

Edward Z. Yang's avatar
Edward Z. Yang committed
786 787
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
788

789 790
  default-language: Haskell2010

791 792 793 794 795
-- 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
796
  hs-source-dirs: tests
797
  ghc-options: -Wall -fwarn-tabs -main-is IntegrationTests2
798 799 800 801
  other-modules:
  build-depends:
        base,
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
802
        cabal-install,
803
        containers,
804
        deepseq,
805
        directory,
806
        edit-distance,
807 808
        filepath,
        tasty,
809 810
        tasty-hunit,
        tagged
811

Edward Z. Yang's avatar
Edward Z. Yang committed
812 813
  if !flag(lib)
    buildable: False
814

Edward Z. Yang's avatar
Edward Z. Yang committed
815
  if !(arch(arm) && impl(ghc < 7.6))
816 817 818
    ghc-options: -threaded
  default-language: Haskell2010

819
custom-setup
820
  setup-depends: Cabal >= 2.1,
821
                 base,
Ben Gamari's avatar
Ben Gamari committed
822
                 process   >= 1.1.0.1  && < 1.7,
823
                 filepath   >= 1.3      && < 1.5