cabal-install.cabal 25.9 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
  tests/IntegrationTests/common.sh
  tests/IntegrationTests/exec/Foo.hs
  tests/IntegrationTests/exec/My.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
31 32 33 34 35 36
  tests/IntegrationTests/exec/T4049.sh
  tests/IntegrationTests/exec/T4049/UseLib.c
  tests/IntegrationTests/exec/T4049/csrc/MyForeignLibWrapper.c
  tests/IntegrationTests/exec/T4049/my-foreign-lib.cabal
  tests/IntegrationTests/exec/T4049/src/MyForeignLib/Hello.hs
  tests/IntegrationTests/exec/T4049/src/MyForeignLib/SomeBindings.hsc
37 38 39 40 41 42 43 44 45 46 47 48
  tests/IntegrationTests/exec/my.cabal
  tests/IntegrationTests/freeze/disable_benchmarks_freezes_bench_deps.sh
  tests/IntegrationTests/freeze/disable_tests_freezes_test_deps.sh
  tests/IntegrationTests/freeze/does_not_freeze_nondeps.sh
  tests/IntegrationTests/freeze/does_not_freeze_self.sh
  tests/IntegrationTests/freeze/dry_run_does_not_create_config.sh
  tests/IntegrationTests/freeze/enable_benchmarks_freezes_bench_deps.sh
  tests/IntegrationTests/freeze/enable_tests_freezes_test_deps.sh
  tests/IntegrationTests/freeze/freezes_direct_dependencies.sh
  tests/IntegrationTests/freeze/freezes_transitive_dependencies.sh
  tests/IntegrationTests/freeze/my.cabal
  tests/IntegrationTests/freeze/runs_without_error.sh
49
  tests/IntegrationTests/internal-libs/cabal.project
50 51
  tests/IntegrationTests/internal-libs/internal_lib_basic.sh
  tests/IntegrationTests/internal-libs/internal_lib_shadow.sh
52
  tests/IntegrationTests/internal-libs/new_build.sh
53 54 55 56 57 58 59 60 61 62 63 64
  tests/IntegrationTests/internal-libs/p/Foo.hs
  tests/IntegrationTests/internal-libs/p/p.cabal
  tests/IntegrationTests/internal-libs/p/p/P.hs
  tests/IntegrationTests/internal-libs/p/q/Q.hs
  tests/IntegrationTests/internal-libs/q/Q.hs
  tests/IntegrationTests/internal-libs/q/q.cabal
  tests/IntegrationTests/manpage/outputs_manpage.sh
  tests/IntegrationTests/multiple-source/finds_second_source_of_multiple_source.sh
  tests/IntegrationTests/multiple-source/p/Setup.hs
  tests/IntegrationTests/multiple-source/p/p.cabal
  tests/IntegrationTests/multiple-source/q/Setup.hs
  tests/IntegrationTests/multiple-source/q/q.cabal
65 66 67 68 69 70
  tests/IntegrationTests/new-build/BuildToolsPath.sh
  tests/IntegrationTests/new-build/BuildToolsPath/A.hs
  tests/IntegrationTests/new-build/BuildToolsPath/MyCustomPreprocessor.hs
  tests/IntegrationTests/new-build/BuildToolsPath/build-tools-path.cabal
  tests/IntegrationTests/new-build/BuildToolsPath/cabal.project
  tests/IntegrationTests/new-build/BuildToolsPath/hello/Hello.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
71 72 73 74 75 76 77 78 79 80 81
  tests/IntegrationTests/new-build/T3460.sh
  tests/IntegrationTests/new-build/T3460/C.hs
  tests/IntegrationTests/new-build/T3460/Setup.hs
  tests/IntegrationTests/new-build/T3460/T3460.cabal
  tests/IntegrationTests/new-build/T3460/cabal.project
  tests/IntegrationTests/new-build/T3460/sub-package-A/A.hs
  tests/IntegrationTests/new-build/T3460/sub-package-A/Setup.hs
  tests/IntegrationTests/new-build/T3460/sub-package-A/sub-package-A.cabal
  tests/IntegrationTests/new-build/T3460/sub-package-B/B.hs
  tests/IntegrationTests/new-build/T3460/sub-package-B/Setup.hs
  tests/IntegrationTests/new-build/T3460/sub-package-B/sub-package-B.cabal
82 83 84 85 86
  tests/IntegrationTests/new-build/T3978.err
  tests/IntegrationTests/new-build/T3978.sh
  tests/IntegrationTests/new-build/T3978/cabal.project
  tests/IntegrationTests/new-build/T3978/p/p.cabal
  tests/IntegrationTests/new-build/T3978/q/q.cabal
87 88 89 90
  tests/IntegrationTests/new-build/T4017.sh
  tests/IntegrationTests/new-build/T4017/cabal.project
  tests/IntegrationTests/new-build/T4017/p/p.cabal
  tests/IntegrationTests/new-build/T4017/q/q.cabal
91 92 93 94 95
  tests/IntegrationTests/new-build/executable/Main.hs
  tests/IntegrationTests/new-build/executable/Setup.hs
  tests/IntegrationTests/new-build/executable/Test.hs
  tests/IntegrationTests/new-build/executable/a.cabal
  tests/IntegrationTests/new-build/executable/cabal.project
96 97 98 99 100 101
  tests/IntegrationTests/new-build/external_build_tools.sh
  tests/IntegrationTests/new-build/external_build_tools/cabal.project
  tests/IntegrationTests/new-build/external_build_tools/client/Hello.hs
  tests/IntegrationTests/new-build/external_build_tools/client/client.cabal
  tests/IntegrationTests/new-build/external_build_tools/happy/MyCustomPreprocessor.hs
  tests/IntegrationTests/new-build/external_build_tools/happy/happy.cabal
102
  tests/IntegrationTests/new-build/monitor_cabal_files.sh
103
  tests/IntegrationTests/new-build/monitor_cabal_files/cabal.project
104 105 106 107 108 109 110
  tests/IntegrationTests/new-build/monitor_cabal_files/p/P.hs
  tests/IntegrationTests/new-build/monitor_cabal_files/p/Setup.hs
  tests/IntegrationTests/new-build/monitor_cabal_files/p/p.cabal
  tests/IntegrationTests/new-build/monitor_cabal_files/q/Main.hs
  tests/IntegrationTests/new-build/monitor_cabal_files/q/Setup.hs
  tests/IntegrationTests/new-build/monitor_cabal_files/q/q-broken.cabal.in
  tests/IntegrationTests/new-build/monitor_cabal_files/q/q-fixed.cabal.in
111 112 113 114
  tests/IntegrationTests/regression/t2755.sh
  tests/IntegrationTests/regression/t2755/A.hs
  tests/IntegrationTests/regression/t2755/Setup.hs
  tests/IntegrationTests/regression/t2755/test-t2755.cabal
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
115 116 117 118
  tests/IntegrationTests/regression/t3199.sh
  tests/IntegrationTests/regression/t3199/Main.hs
  tests/IntegrationTests/regression/t3199/Setup.hs
  tests/IntegrationTests/regression/t3199/test-3199.cabal
119 120 121 122 123 124
  tests/IntegrationTests/regression/t3827.sh
  tests/IntegrationTests/regression/t3827/cabal.project
  tests/IntegrationTests/regression/t3827/p/P.hs
  tests/IntegrationTests/regression/t3827/p/p.cabal
  tests/IntegrationTests/regression/t3827/q/Main.hs
  tests/IntegrationTests/regression/t3827/q/q.cabal
125 126 127 128 129
  tests/IntegrationTests/sandbox-reinstalls/p/Main.hs
  tests/IntegrationTests/sandbox-reinstalls/p/p.cabal
  tests/IntegrationTests/sandbox-reinstalls/q/Q.hs
  tests/IntegrationTests/sandbox-reinstalls/q/q.cabal
  tests/IntegrationTests/sandbox-reinstalls/reinstall-modified-source.sh
130 131 132 133 134 135 136 137 138
  tests/IntegrationTests/sandbox-sources/fail_removing_source_thats_not_registered.err
  tests/IntegrationTests/sandbox-sources/fail_removing_source_thats_not_registered.sh
  tests/IntegrationTests/sandbox-sources/p/Setup.hs
  tests/IntegrationTests/sandbox-sources/p/p.cabal
  tests/IntegrationTests/sandbox-sources/q/Setup.hs
  tests/IntegrationTests/sandbox-sources/q/q.cabal
  tests/IntegrationTests/sandbox-sources/remove_nonexistent_source.sh
  tests/IntegrationTests/sandbox-sources/report_success_removing_source.out
  tests/IntegrationTests/sandbox-sources/report_success_removing_source.sh
139
  tests/IntegrationTests/user-config/common.sh
140 141 142 143 144 145 146 147
  tests/IntegrationTests/user-config/doesnt_overwrite_without_f.err
  tests/IntegrationTests/user-config/doesnt_overwrite_without_f.sh
  tests/IntegrationTests/user-config/overwrites_with_f.out
  tests/IntegrationTests/user-config/overwrites_with_f.sh
  tests/IntegrationTests/user-config/runs_without_error.out
  tests/IntegrationTests/user-config/runs_without_error.sh
  tests/IntegrationTests/user-config/uses_CABAL_CONFIG.out
  tests/IntegrationTests/user-config/uses_CABAL_CONFIG.sh
148 149 150 151 152
  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
153 154 155 156 157 158 159 160 161
  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
162
  tests/IntegrationTests2/exception/bad-config/cabal.project
163 164 165 166 167
  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
168 169 170 171 172
  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
173
  -- END gen-extra-source-files
Duncan Coutts's avatar
Duncan Coutts committed
174 175

source-repository head
176 177
  type:     git
  location: https://github.com/haskell/cabal/
Duncan Coutts's avatar
Duncan Coutts committed
178
  subdir:   cabal-install
179

180 181 182 183
Flag old-bytestring
  description:  Use bytestring < 0.10.2 and bytestring-builder
  default: False

184 185 186 187
Flag old-directory
  description:  Use directory < 1.2 and old-time
  default:      False

188 189 190 191
Flag network-uri
  description:  Get Network.URI from the network-uri package
  default:      True

192 193 194 195 196
Flag debug-assertions
  description:  Enable expensive assertions for testing or debugging
  default:      False
  manual:       True

197 198 199
Flag debug-conflict-sets
  description:  Add additional information to ConflictSets
  default:      False
kristenk's avatar
kristenk committed
200
  manual:       True
201

Edsko de Vries's avatar
Edsko de Vries committed
202 203 204
Flag debug-tracetree
  description:  Compile in support for tracetree (used to debug the solver)
  default:      False
kristenk's avatar
kristenk committed
205
  manual:       True
Edsko de Vries's avatar
Edsko de Vries committed
206

207
flag parsec
208
  description:  Use parsec parser. This requires 'Cabal' library built with its parsec flag enabled.
209 210 211
  default:      False
  manual:       True

Edward Z. Yang's avatar
Edward Z. Yang committed
212 213 214 215 216 217 218
flag lib
  description:  Build cabal-install as a library. Please only use this if you are a cabal-install developer.
  default:      False
  manual:       True

library
    ghc-options:    -Wall -fwarn-tabs
219
    if impl(ghc >= 8.0)
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
220 221 222
        ghc-options: -Wcompat
                     -Wnoncanonical-monad-instances
                     -Wnoncanonical-monadfail-instances
223

Edward Z. Yang's avatar
Edward Z. Yang committed
224
    exposed-modules:
225
        Distribution.Client.BuildTarget
Duncan Coutts's avatar
Duncan Coutts committed
226 227
        Distribution.Client.BuildReports.Anonymous
        Distribution.Client.BuildReports.Storage
Duncan Coutts's avatar
Duncan Coutts committed
228
        Distribution.Client.BuildReports.Types
Duncan Coutts's avatar
Duncan Coutts committed
229
        Distribution.Client.BuildReports.Upload
230
        Distribution.Client.Check
231 232
        Distribution.Client.CmdBuild
        Distribution.Client.CmdConfigure
Duncan Coutts's avatar
Duncan Coutts committed
233
        Distribution.Client.CmdFreeze
Ben Gamari's avatar
Ben Gamari committed
234
        Distribution.Client.CmdHaddock
Oleg Grenrus's avatar
Oleg Grenrus committed
235
        Distribution.Client.CmdTest
236
        Distribution.Client.CmdRepl
237
        Distribution.Client.Config
Duncan Coutts's avatar
Duncan Coutts committed
238
        Distribution.Client.Configure
239 240
        Distribution.Client.Dependency
        Distribution.Client.Dependency.Types
Duncan Coutts's avatar
Duncan Coutts committed
241
        Distribution.Client.DistDirLayout
barmston's avatar
barmston committed
242
        Distribution.Client.Exec
243
        Distribution.Client.Fetch
Duncan Coutts's avatar
Duncan Coutts committed
244
        Distribution.Client.FetchUtils
245
        Distribution.Client.FileMonitor
246
        Distribution.Client.Freeze
247
        Distribution.Client.GenBounds
248
        Distribution.Client.Get
249
        Distribution.Client.Glob
250
        Distribution.Client.GlobalFlags
251
        Distribution.Client.GZipUtils
252
        Distribution.Client.Haddock
253 254
        Distribution.Client.HttpUtils
        Distribution.Client.IndexUtils
255
        Distribution.Client.IndexUtils.Timestamp
256 257 258 259
        Distribution.Client.Init
        Distribution.Client.Init.Heuristics
        Distribution.Client.Init.Licenses
        Distribution.Client.Init.Types
260 261
        Distribution.Client.Install
        Distribution.Client.InstallPlan
262
        Distribution.Client.InstallSymlink
263
        Distribution.Client.JobControl
264
        Distribution.Client.List
Maciek Makowski's avatar
Maciek Makowski committed
265
        Distribution.Client.Manpage
ttuegel's avatar
ttuegel committed
266
        Distribution.Client.Nix
267
        Distribution.Client.Outdated
Duncan Coutts's avatar
Duncan Coutts committed
268
        Distribution.Client.PackageHash
269
        Distribution.Client.PackageUtils
270
        Distribution.Client.ParseUtils
Duncan Coutts's avatar
Duncan Coutts committed
271
        Distribution.Client.ProjectBuilding
272
        Distribution.Client.ProjectBuilding.Types
273 274 275
        Distribution.Client.ProjectConfig
        Distribution.Client.ProjectConfig.Types
        Distribution.Client.ProjectConfig.Legacy
276
        Distribution.Client.ProjectOrchestration
Duncan Coutts's avatar
Duncan Coutts committed
277
        Distribution.Client.ProjectPlanning
278
        Distribution.Client.ProjectPlanning.Types
279
        Distribution.Client.ProjectPlanOutput
280
        Distribution.Client.RebuildMonad
ttuegel's avatar
ttuegel committed
281 282
        Distribution.Client.Reconfigure
        Distribution.Client.Run
283
        Distribution.Client.Sandbox
284 285
        Distribution.Client.Sandbox.Index
        Distribution.Client.Sandbox.PackageEnvironment
286
        Distribution.Client.Sandbox.Timestamp
287
        Distribution.Client.Sandbox.Types
ttuegel's avatar
ttuegel committed
288
        Distribution.Client.SavedFlags
289
        Distribution.Client.Security.DNS
Edsko de Vries's avatar
Edsko de Vries committed
290
        Distribution.Client.Security.HTTP
291 292 293
        Distribution.Client.Setup
        Distribution.Client.SetupWrapper
        Distribution.Client.SrcDist
294
        Distribution.Client.SolverInstallPlan
295
        Distribution.Client.SolverPlanIndex
296
        Distribution.Client.SourceFiles
297
        Distribution.Client.Tar
298
        Distribution.Client.Targets
299 300 301 302
        Distribution.Client.Types
        Distribution.Client.Update
        Distribution.Client.Upload
        Distribution.Client.Utils
303
        Distribution.Client.Utils.Assertion
304
        Distribution.Client.Utils.Json
305
        Distribution.Client.World
306
        Distribution.Client.Win32SelfUpgrade
307
        Distribution.Client.Compat.ExecutablePath
308
        Distribution.Client.Compat.FilePerms
309
        Distribution.Client.Compat.Prelude
310
        Distribution.Client.Compat.Process
311
        Distribution.Client.Compat.Semaphore
312
        Distribution.Solver.Types.ComponentDeps
313
        Distribution.Solver.Types.ConstraintSource
314
        Distribution.Solver.Types.DependencyResolver
315
        Distribution.Solver.Types.Flag
316
        Distribution.Solver.Types.InstalledPreference
317
        Distribution.Solver.Types.InstSolverPackage
318
        Distribution.Solver.Types.LabeledPackageConstraint
319
        Distribution.Solver.Types.OptionalStanza
320
        Distribution.Solver.Types.PackageConstraint
321 322
        Distribution.Solver.Types.PackageFixedDeps
        Distribution.Solver.Types.PackageIndex
323
        Distribution.Solver.Types.PackagePath
324
        Distribution.Solver.Types.PackagePreferences
325 326
        Distribution.Solver.Types.PkgConfigDb
        Distribution.Solver.Types.Progress
327
        Distribution.Solver.Types.ResolverPackage
328 329 330 331
        Distribution.Solver.Types.Settings
        Distribution.Solver.Types.SolverId
        Distribution.Solver.Types.SolverPackage
        Distribution.Solver.Types.SourcePackage
332
        Distribution.Solver.Types.Variable
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
        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.Linking
        Distribution.Solver.Modular.LabeledGraph
        Distribution.Solver.Modular.Log
        Distribution.Solver.Modular.Message
        Distribution.Solver.Modular.Package
        Distribution.Solver.Modular.Preference
        Distribution.Solver.Modular.PSQ
352
        Distribution.Solver.Modular.RetryLog
353 354 355 356 357
        Distribution.Solver.Modular.Solver
        Distribution.Solver.Modular.Tree
        Distribution.Solver.Modular.Validate
        Distribution.Solver.Modular.Var
        Distribution.Solver.Modular.Version
358
        Distribution.Solver.Modular.WeightedPSQ
359
        Paths_cabal_install
360

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
361 362
    -- NOTE: when updating build-depends, don't forget to update version regexps
    -- in bootstrap.sh.
Ben Millwood's avatar
Ben Millwood committed
363
    build-depends:
Duncan Coutts's avatar
Duncan Coutts committed
364
        async      >= 2.0      && < 3,
365 366
        array      >= 0.4      && < 0.6,
        base       >= 4.5      && < 5,
367
        base16-bytestring >= 0.1.1 && < 0.2,
368
        binary     >= 0.5      && < 0.9,
Ben Millwood's avatar
Ben Millwood committed
369
        bytestring >= 0.9      && < 1,
370
        Cabal      >= 2.1      && < 2.2,
371
        containers >= 0.4      && < 0.6,
372
        cryptohash-sha256 >= 0.11 && < 0.12,
373
        deepseq    >= 1.3      && < 1.5,
Ryan Scott's avatar
Ryan Scott committed
374
        echo       >= 0.1.3    && < 0.2,
375
        edit-distance >= 0.2.2 && < 0.3,
376
        filepath   >= 1.3      && < 1.5,
377
        hashable   >= 1.0      && < 2,
378
        HTTP       >= 4000.1.5 && < 4000.4,
Ben Millwood's avatar
Ben Millwood committed
379
        mtl        >= 2.0      && < 3,
380
        pretty     >= 1.1      && < 1.2,
dsf's avatar
dsf committed
381
        random     >= 1        && < 1.2,
Ben Millwood's avatar
Ben Millwood committed
382
        stm        >= 2.0      && < 3,
383
        tar        >= 0.5.0.3  && < 0.6,
384
        time       >= 1.4      && < 1.8,
Edsko de Vries's avatar
Edsko de Vries committed
385
        zlib       >= 0.5.3    && < 0.7,
386
        hackage-security >= 0.5.2.2 && < 0.6
387

388 389 390 391 392
    if flag(old-bytestring)
      build-depends: bytestring <  0.10.2, bytestring-builder >= 0.10 && < 1
    else
      build-depends: bytestring >= 0.10.2

393
    if flag(old-directory)
394
      build-depends: directory >= 1.1 && < 1.2, old-time >= 1 && < 1.2,
395
                     process   >= 1.0.1.1  && < 1.1.0.2
396
    else
397
      build-depends: directory >= 1.2 && < 1.4,
Tamar Christina's avatar
Tamar Christina committed
398
                     process   >= 1.1.0.2  && < 1.6
399

400 401 402
    -- NOTE: you MUST include the network dependency even when network-uri
    -- is pulled in, otherwise the constraint solver doesn't have enough
    -- information
403
    if flag(network-uri)
404
      build-depends: network-uri >= 2.6 && < 2.7, network >= 2.6 && < 2.7
405
    else
tibbe's avatar
tibbe committed
406
      build-depends: network     >= 2.4 && < 2.6
407

408 409 410 411
    -- Needed for GHC.Generics before GHC 7.6
    if impl(ghc < 7.6)
      build-depends: ghc-prim >= 0.2 && < 0.3

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

417 418 419
    if flag(debug-assertions)
      cpp-options: -DDEBUG_ASSERTIONS

420 421 422 423
    if flag(debug-conflict-sets)
      cpp-options: -DDEBUG_CONFLICT_SETS
      build-depends: base >= 4.8

Edsko de Vries's avatar
Edsko de Vries committed
424 425 426 427
    if flag(debug-tracetree)
      cpp-options: -DDEBUG_TRACETREE
      build-depends: tracetree >= 0.1 && < 0.2

428 429 430
    if flag(parsec)
      cpp-options: -DCABAL_PARSEC

Edward Z. Yang's avatar
Edward Z. Yang committed
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
    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

    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,
            time       >= 1.4      && < 1.8,
            zlib       >= 0.5.3    && < 0.7,
            hackage-security >= 0.5.2.2 && < 0.6

        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,
                         process   >= 1.1.0.2  && < 1.5

        -- 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

        -- 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

509 510 511
        if flag(debug-assertions)
          cpp-options: -DDEBUG_ASSERTIONS

Edward Z. Yang's avatar
Edward Z. Yang committed
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528
        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

        if flag(parsec)
          cpp-options: -DCABAL_PARSEC

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

    if flag(parsec)
      cpp-options: -DCABAL_PARSEC

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
529
    default-language: Haskell2010
530

barmston's avatar
barmston committed
531
-- Small, fast running tests.
532 533 534
Test-Suite unit-tests
  type: exitcode-stdio-1.0
  main-is: UnitTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
535
  hs-source-dirs: tests
536 537
  ghc-options: -Wall -fwarn-tabs
  other-modules:
538
    UnitTests.Distribution.Client.ArbitraryInstances
539
    UnitTests.Distribution.Client.Targets
Duncan Coutts's avatar
Duncan Coutts committed
540
    UnitTests.Distribution.Client.FileMonitor
541
    UnitTests.Distribution.Client.Glob
542
    UnitTests.Distribution.Client.GZipUtils
543
    UnitTests.Distribution.Client.Sandbox
544
    UnitTests.Distribution.Client.Sandbox.Timestamp
545
    UnitTests.Distribution.Client.Tar
546
    UnitTests.Distribution.Client.UserConfig
547
    UnitTests.Distribution.Client.ProjectConfig
548
    UnitTests.Distribution.Client.JobControl
549
    UnitTests.Distribution.Client.IndexUtils.Timestamp
550
    UnitTests.Distribution.Client.InstallPlan
551
    UnitTests.Distribution.Solver.Modular.PSQ
552
    UnitTests.Distribution.Solver.Modular.RetryLog
553 554
    UnitTests.Distribution.Solver.Modular.Solver
    UnitTests.Distribution.Solver.Modular.DSL
555
    UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
kristenk's avatar
kristenk committed
556
    UnitTests.Distribution.Solver.Modular.WeightedPSQ
557
    UnitTests.Options
558
  build-depends:
Edward Z. Yang's avatar
Edward Z. Yang committed
559
        array,
560
        base,
Duncan Coutts's avatar
Duncan Coutts committed
561
        async,
562
        bytestring,
Edward Z. Yang's avatar
Edward Z. Yang committed
563
        cabal-install,
564 565
        Cabal,
        containers,
566
        deepseq,
567
        mtl,
Edward Z. Yang's avatar
Edward Z. Yang committed
568
        random,
569
        directory,
570
        filepath,
Duncan Coutts's avatar
Duncan Coutts committed
571
        tar,
572 573
        time,
        zlib,
Edward Z. Yang's avatar
Edward Z. Yang committed
574 575
        network-uri,
        network,
576 577 578
        tasty,
        tasty-hunit,
        tasty-quickcheck,
Edsko de Vries's avatar
Edsko de Vries committed
579
        tagged,
580
        QuickCheck >= 2.8.2
581

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

Edward Z. Yang's avatar
Edward Z. Yang committed
585 586
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
587

Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
588
  default-language: Haskell2010
barmston's avatar
barmston committed
589

590
-- Tests to run with a limited stack and heap size
591 592 593
Test-Suite memory-usage-tests
  type: exitcode-stdio-1.0
  main-is: MemoryUsageTests.hs
Edward Z. Yang's avatar
Edward Z. Yang committed
594
  hs-source-dirs: tests
595
  ghc-options: -Wall -fwarn-tabs "-with-rtsopts=-M4M -K1K"
596 597 598 599 600 601 602 603 604
  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
605
        cabal-install,
606 607 608 609 610 611 612 613 614
        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
615 616
  if !flag(lib)
    buildable: False
617 618 619

  default-language: Haskell2010

620 621 622 623
-- 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
624 625
  hs-source-dirs: tests
  ghc-options: -Wall -fwarn-tabs
626
  other-modules:
627 628
    UnitTests.Distribution.Solver.Modular.DSL
    UnitTests.Distribution.Solver.Modular.QuickCheck
629 630
  build-depends:
        base,
Duncan Coutts's avatar
Duncan Coutts committed
631
        async,
632
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
633
        cabal-install,
634
        containers,
635
        deepseq >= 1.2,
636 637 638 639 640
        tasty,
        tasty-quickcheck,
        QuickCheck >= 2.8.2,
        pretty-show

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

Edward Z. Yang's avatar
Edward Z. Yang committed
644 645
  if !flag(lib)
    buildable: False
Edsko de Vries's avatar
Edsko de Vries committed
646

647 648
  default-language: Haskell2010

649
-- Integration tests that call the cabal executable externally
650
test-suite integration-tests
barmston's avatar
barmston committed
651 652
  type: exitcode-stdio-1.0
  hs-source-dirs: tests
653
  main-is: IntegrationTests.hs
barmston's avatar
barmston committed
654 655
  build-depends:
    Cabal,
656
    async,
barmston's avatar
barmston committed
657 658 659 660 661
    base,
    bytestring,
    directory,
    filepath,
    process,
662
    regex-posix,
663
    tasty,
664
    tasty-hunit
barmston's avatar
barmston committed
665 666 667 668

  if os(windows)
    build-depends: Win32 >= 2 && < 3
  else
669
    build-depends: unix >= 2.5 && < 2.8
barmston's avatar
barmston committed
670

671
  if !(arch(arm) && impl(ghc < 7.6))
barmston's avatar
barmston committed
672 673
    ghc-options: -threaded

Edward Z. Yang's avatar
Edward Z. Yang committed
674
  ghc-options: -Wall -fwarn-tabs
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
675
  default-language: Haskell2010
676

677 678 679 680 681
-- 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
682 683
  hs-source-dirs: tests
  ghc-options: -Wall -fwarn-tabs
684 685 686 687
  other-modules:
  build-depends:
        base,
        Cabal,
Edward Z. Yang's avatar
Edward Z. Yang committed
688
        cabal-install,
689
        containers,
690
        deepseq,
691 692 693
        directory,
        filepath,
        tasty,
694 695
        tasty-hunit,
        tagged
696

Edward Z. Yang's avatar
Edward Z. Yang committed
697 698
  if !flag(lib)
    buildable: False
699

Edward Z. Yang's avatar
Edward Z. Yang committed
700
  if !(arch(arm) && impl(ghc < 7.6))
701 702 703
    ghc-options: -threaded
  default-language: Haskell2010

704
custom-setup
705
  setup-depends: Cabal >= 2.1,
706
                 base,
Tamar Christina's avatar
Tamar Christina committed
707
                 process   >= 1.1.0.1  && < 1.6,
708
                 filepath   >= 1.3      && < 1.5