cabal-install.cabal 29 KB
Newer Older
1
Name:               cabal-install
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
2
Version:            2.3.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 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
  tests/IntegrationTests2/targets/exes-disabled/cabal.project
  tests/IntegrationTests2/targets/exes-disabled/p/p.cabal
  tests/IntegrationTests2/targets/exes-disabled/q/q.cabal
68
  tests/IntegrationTests2/targets/lib-only/p.cabal
69 70 71 72 73 74 75 76 77 78
  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
79 80 81
  tests/IntegrationTests2/targets/simple/P.hs
  tests/IntegrationTests2/targets/simple/cabal.project
  tests/IntegrationTests2/targets/simple/p.cabal
82
  tests/IntegrationTests2/targets/simple/q/QQ.hs
83
  tests/IntegrationTests2/targets/simple/q/q.cabal
84 85 86 87 88 89
  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
90
  -- END gen-extra-source-files
Duncan Coutts's avatar
Duncan Coutts committed
91 92

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

97 98
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
99
  default:      True
100 101
  manual:       True

102
Flag debug-expensive-assertions
103 104 105 106
  description:  Enable expensive assertions for testing or debugging
  default:      False
  manual:       True

107 108 109
Flag debug-conflict-sets
  description:  Add additional information to ConflictSets
  default:      False
kristenk's avatar
kristenk committed
110
  manual:       True
111

Edsko de Vries's avatar
Edsko de Vries committed
112 113 114
Flag debug-tracetree
  description:  Compile in support for tracetree (used to debug the solver)
  default:      False
kristenk's avatar
kristenk committed
115
  manual:       True
Edsko de Vries's avatar
Edsko de Vries committed
116

Edward Z. Yang's avatar
Edward Z. Yang committed
117 118
flag lib
  description:  Build cabal-install as a library. Please only use this if you are a cabal-install developer.
119
  Default:      False
Edward Z. Yang's avatar
Edward Z. Yang committed
120 121
  manual:       True

122 123 124 125 126 127 128 129
-- 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.
130 131 132 133 134
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
135 136
library
    ghc-options:    -Wall -fwarn-tabs
137
    if impl(ghc >= 8.0)
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
138 139 140
        ghc-options: -Wcompat
                     -Wnoncanonical-monad-instances
                     -Wnoncanonical-monadfail-instances
141

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

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

320 321 322 323 324
    if flag(native-dns)
      if os(windows)
        build-depends: windns      >= 0.1.0 && < 0.2
      else
        build-depends: resolv      >= 0.1.1 && < 0.2
325

326
    if os(windows)
327
      build-depends: Win32 >= 2 && < 3
328
    else
Ryan Scott's avatar
Ryan Scott committed
329
      build-depends: unix >= 2.5 && < 2.9
330

331 332
    if flag(debug-expensive-assertions)
      cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS
333

334 335 336 337
    if flag(debug-conflict-sets)
      cpp-options: -DDEBUG_CONFLICT_SETS
      build-depends: base >= 4.8

Edsko de Vries's avatar
Edsko de Vries committed
338 339 340 341
    if flag(debug-tracetree)
      cpp-options: -DDEBUG_TRACETREE
      build-depends: tracetree >= 0.1 && < 0.2

Edward Z. Yang's avatar
Edward Z. Yang committed
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
    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

357 358
    other-modules: Paths_cabal_install

Edward Z. Yang's avatar
Edward Z. Yang committed
359 360 361
    if flag(lib)
        build-depends:
            cabal-install,
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
362
            Cabal      >= 2.3      && < 2.4,
Edward Z. Yang's avatar
Edward Z. Yang committed
363 364 365 366 367 368 369 370 371 372
            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,
373 374
            binary     >= 0.7      && < 0.9,
            bytestring >= 0.10.2   && < 1,
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
375
            Cabal      >= 2.3      && < 2.4,
Edward Z. Yang's avatar
Edward Z. Yang committed
376 377 378
            containers >= 0.4      && < 0.6,
            cryptohash-sha256 >= 0.11 && < 0.12,
            deepseq    >= 1.3      && < 1.5,
379
            directory  >= 1.2.2.0  && < 1.4,
Edward Z. Yang's avatar
Edward Z. Yang committed
380 381 382 383 384 385
            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,
386 387
            network    >= 2.6      && < 2.7,
            network-uri >= 2.6     && < 2.7,
Edward Z. Yang's avatar
Edward Z. Yang committed
388
            pretty     >= 1.1      && < 1.2,
389
            process    >= 1.2      && < 1.7,
Edward Z. Yang's avatar
Edward Z. Yang committed
390 391 392
            random     >= 1        && < 1.2,
            stm        >= 2.0      && < 3,
            tar        >= 0.5.0.3  && < 0.6,
393
            time       >= 1.4      && < 1.9,
Edward Z. Yang's avatar
Edward Z. Yang committed
394 395 396
            zlib       >= 0.5.3    && < 0.7,
            hackage-security >= 0.5.2.2 && < 0.6

397 398 399 400 401 402 403 404 405
        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
406
            Distribution.Client.CmdUpdate
407
            Distribution.Client.CmdErrorMessages
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
408
            Distribution.Client.CmdExec
409 410
            Distribution.Client.CmdFreeze
            Distribution.Client.CmdHaddock
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
411
            Distribution.Client.CmdInstall
412 413 414
            Distribution.Client.CmdRepl
            Distribution.Client.CmdRun
            Distribution.Client.CmdTest
415
            Distribution.Client.Compat.Directory
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
            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
480
            Distribution.Client.SourceRepoParse
481 482 483 484 485 486 487 488 489 490 491 492 493
            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
494
            Distribution.Solver.Compat.Prelude
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
            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
542

543 544 545 546 547
        if flag(native-dns)
          if os(windows)
            build-depends: windns      >= 0.1.0 && < 0.2
          else
            build-depends: resolv      >= 0.1.1 && < 0.2
548

Edward Z. Yang's avatar
Edward Z. Yang committed
549 550 551
        if os(windows)
          build-depends: Win32 >= 2 && < 3
        else
Ryan Scott's avatar
Ryan Scott committed
552
          build-depends: unix >= 2.5 && < 2.9
Edward Z. Yang's avatar
Edward Z. Yang committed
553

554 555
        if flag(debug-expensive-assertions)
          cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS
556

Edward Z. Yang's avatar
Edward Z. Yang committed
557 558 559 560 561 562 563 564
        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

565 566 567 568 569 570 571
    if flag(monolithic)
      hs-source-dirs: tests
      other-modules:
        UnitTests
        MemoryUsageTests
        SolverQuickCheck
        IntegrationTests2
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591

        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
592
        UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
593 594 595 596 597
        UnitTests.Distribution.Solver.Modular.RetryLog
        UnitTests.Distribution.Solver.Modular.Solver
        UnitTests.Distribution.Solver.Modular.WeightedPSQ
        UnitTests.Options

598 599
      cpp-options: -DMONOLITHIC
      build-depends:
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
600
        Cabal      >= 2.3 && < 2.4,
601 602 603 604 605 606 607 608 609
        QuickCheck >= 2.8.2,
        array,
        async,
        bytestring,
        containers,
        deepseq,
        directory,
        edit-distance,
        filepath,
610
        hashable,
611 612 613
        mtl,
        network,
        network-uri,
614
        pretty-show >= 1.6.15,
615 616 617
        random,
        tagged,
        tar,
618
        tasty >= 1.0 && < 1.1,
619
        tasty-hunit >= 0.10,
620 621 622 623
        tasty-quickcheck,
        time,
        zlib

624
    ghc-options: -threaded
625

626 627 628
    -- 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
629

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
630
    default-language: Haskell2010
631

barmston's avatar
barmston committed
632
-- Small, fast running tests.
633 634 635
Test-Suite unit-tests
  type: exitcode-stdio-1.0
  main-is: UnitTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
636
  hs-source-dirs: tests
637
  ghc-options: -Wall -fwarn-tabs -main-is UnitTests
638
  other-modules:
639
    UnitTests.Distribution.Client.ArbitraryInstances
640
    UnitTests.Distribution.Client.Targets
Duncan Coutts's avatar
Duncan Coutts committed
641
    UnitTests.Distribution.Client.FileMonitor
642
    UnitTests.Distribution.Client.Glob
643
    UnitTests.Distribution.Client.GZipUtils
644
    UnitTests.Distribution.Client.Sandbox
645
    UnitTests.Distribution.Client.Sandbox.Timestamp
646
    UnitTests.Distribution.Client.Store
647
    UnitTests.Distribution.Client.Tar
648
    UnitTests.Distribution.Client.UserConfig
649
    UnitTests.Distribution.Client.ProjectConfig
650
    UnitTests.Distribution.Client.JobControl
651
    UnitTests.Distribution.Client.IndexUtils.Timestamp
652
    UnitTests.Distribution.Client.InstallPlan
kristenk's avatar
kristenk committed
653
    UnitTests.Distribution.Solver.Modular.Builder
654
    UnitTests.Distribution.Solver.Modular.RetryLog
655 656
    UnitTests.Distribution.Solver.Modular.Solver
    UnitTests.Distribution.Solver.Modular.DSL
657
    UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
kristenk's avatar
kristenk committed
658
    UnitTests.Distribution.Solver.Modular.WeightedPSQ
659
    UnitTests.Options
660
  build-depends:
Edward Z. Yang's avatar
Edward Z. Yang committed
661
        array,
662
        base,
Duncan Coutts's avatar
Duncan Coutts committed
663
        async,
664
        bytestring,
Edward Z. Yang's avatar
Edward Z. Yang committed
665
        cabal-install,
666 667
        Cabal,
        containers,
668
        deepseq,
669
        mtl,
Edward Z. Yang's avatar
Edward Z. Yang committed
670
        random,
671
        directory,
672
        filepath,
Duncan Coutts's avatar
Duncan Coutts committed
673
        tar,
674 675
        time,
        zlib,
Edward Z. Yang's avatar
Edward Z. Yang committed
676 677
        network-uri,
        network,
678
        tasty >= 1.0 && < 1.1,
679
        tasty-hunit >= 0.10,
680
        tasty-quickcheck,
Edsko de Vries's avatar
Edsko de Vries committed
681
        tagged,
682
        QuickCheck >= 2.8.2
683

684
  ghc-options: -threaded
685

Edward Z. Yang's avatar
Edward Z. Yang committed
686 687
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
688

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
689
  default-language: Haskell2010
barmston's avatar
barmston committed
690

691
-- Tests to run with a limited stack and heap size
692 693 694
Test-Suite memory-usage-tests
  type: exitcode-stdio-1.0
  main-is: MemoryUsageTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
695
  hs-source-dirs: tests
696
  ghc-options: -Wall -fwarn-tabs "-with-rtsopts=-M4M -K1K" -main-is MemoryUsageTests
697 698 699 700 701 702 703 704 705
  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
706
        cabal-install,
707 708 709
        containers,
        deepseq,
        tagged,
710
        tasty >= 1.0 && < 1.1,
711
        tasty-hunit >= 0.10
712

713
  ghc-options: -threaded
714

Edward Z. Yang's avatar
Edward Z. Yang committed
715 716
  if !flag(lib)
    buildable: False
717 718 719

  default-language: Haskell2010

720 721 722 723
-- 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
724
  hs-source-dirs: tests
725
  ghc-options: -Wall -fwarn-tabs -main-is SolverQuickCheck
726
  other-modules:
727 728
    UnitTests.Distribution.Solver.Modular.DSL
    UnitTests.Distribution.Solver.Modular.QuickCheck
729
    UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
730 731
  build-depends:
        base,
Duncan Coutts's avatar
Duncan Coutts committed
732
        async,
733
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
734
        cabal-install,
735
        containers,
736
        deepseq >= 1.2,
737
        hashable,
738 739
        random,
        tagged,
740
        tasty >= 1.0 && <1.1,
741 742
        tasty-quickcheck,
        QuickCheck >= 2.8.2,
743
        pretty-show >= 1.6.15
744

745
  ghc-options: -threaded
746

Edward Z. Yang's avatar
Edward Z. Yang committed
747 748
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
749

750 751
  default-language: Haskell2010

752 753 754 755 756
-- 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
757
  hs-source-dirs: tests
758
  ghc-options: -Wall -fwarn-tabs -main-is IntegrationTests2
759 760 761 762
  other-modules:
  build-depends:
        base,
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
763
        cabal-install,
764
        containers,
765
        deepseq,
766
        directory,
767
        edit-distance,
768
        filepath,
769
        tasty >= 1.0 && < 1.1,
770
        tasty-hunit >= 0.10,
771
        tagged
772

Edward Z. Yang's avatar
Edward Z. Yang committed
773 774
  if !flag(lib)
    buildable: False
775

776
  ghc-options: -threaded
777 778
  default-language: Haskell2010

779
custom-setup
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
780
  setup-depends: Cabal >= 2.2,
781
                 base,
Ben Gamari's avatar
Ben Gamari committed
782
                 process   >= 1.1.0.1  && < 1.7,
783
                 filepath  >= 1.3      && < 1.5