Use `open-browser` for proper `haddock --open` on Windows
[cabal.git] / cabal-install / cabal-install.cabal
blobf842d4d31577e6bda48808c44bf5a0e92af5a5ab
1 Cabal-Version:      2.2
3 Name:               cabal-install
4 Version:            3.11.0.0
5 Synopsis:           The command-line interface for Cabal and Hackage.
6 Description:
7     The \'cabal\' command-line program simplifies the process of managing
8     Haskell software by automating the fetching, configuration, compilation
9     and installation of Haskell libraries and programs.
10 homepage:           http://www.haskell.org/cabal/
11 bug-reports:        https://github.com/haskell/cabal/issues
12 License:            BSD-3-Clause
13 License-File:       LICENSE
14 Author:             Cabal Development Team (see AUTHORS file)
15 Maintainer:         Cabal Development Team <cabal-devel@haskell.org>
16 Copyright:          2003-2023, Cabal Development Team
17 Category:           Distribution
18 Build-type:         Simple
19 Extra-Source-Files:
20   README.md
21   bash-completion/cabal
22   changelog
24 source-repository head
25   type:     git
26   location: https://github.com/haskell/cabal/
27   subdir:   cabal-install
29 Flag native-dns
30   description:
31     Enable use of the [resolv](https://hackage.haskell.org/package/resolv)
32     & [windns](https://hackage.haskell.org/package/windns) packages for performing DNS lookups
33   default:      True
34   manual:       True
36 Flag lukko
37   description:  Use @lukko@ for file-locking
38   default:      True
39   manual:       True
41 common warnings
42     ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates
43     if impl(ghc < 8.8)
44       ghc-options: -Wnoncanonical-monadfail-instances
45     if impl(ghc >=9.0)
46       -- Warning: even though introduced with GHC 8.10, -Wunused-packages
47       -- gives false positives with GHC 8.10.
48       ghc-options: -Wunused-packages
50 common base-dep
51     build-depends: base >=4.10 && <4.20
53 common cabal-dep
54     build-depends: Cabal ^>=3.11
56 common cabal-syntax-dep
57     build-depends: Cabal-syntax ^>=3.11
59 common cabal-install-solver-dep
60     build-depends: cabal-install-solver ^>=3.11
62 library
63     import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
64     default-language: Haskell2010
65     default-extensions: TypeOperators
67     hs-source-dirs:   src
68     other-modules:
69         Paths_cabal_install
70     exposed-modules:
71         -- this modules are moved from Cabal
72         -- they are needed for as long until cabal-install moves to parsec parser
73         Distribution.Deprecated.ParseUtils
74         Distribution.Deprecated.ReadP
75         Distribution.Deprecated.ViewAsFieldDescr
77         Distribution.Client.BuildReports.Anonymous
78         Distribution.Client.BuildReports.Lens
79         Distribution.Client.BuildReports.Storage
80         Distribution.Client.BuildReports.Types
81         Distribution.Client.BuildReports.Upload
82         Distribution.Client.Check
83         Distribution.Client.CmdBench
84         Distribution.Client.CmdBuild
85         Distribution.Client.CmdClean
86         Distribution.Client.CmdConfigure
87         Distribution.Client.CmdErrorMessages
88         Distribution.Client.CmdExec
89         Distribution.Client.CmdFreeze
90         Distribution.Client.CmdHaddock
91         Distribution.Client.CmdHaddockProject
92         Distribution.Client.CmdInstall
93         Distribution.Client.CmdInstall.ClientInstallFlags
94         Distribution.Client.CmdInstall.ClientInstallTargetSelector
95         Distribution.Client.CmdLegacy
96         Distribution.Client.CmdListBin
97         Distribution.Client.CmdOutdated
98         Distribution.Client.CmdRepl
99         Distribution.Client.CmdRun
100         Distribution.Client.CmdSdist
101         Distribution.Client.CmdTest
102         Distribution.Client.CmdUpdate
103         Distribution.Client.Compat.Directory
104         Distribution.Client.Compat.ExecutablePath
105         Distribution.Client.Compat.Orphans
106         Distribution.Client.Compat.Prelude
107         Distribution.Client.Compat.Semaphore
108         Distribution.Client.Compat.Tar
109         Distribution.Client.Config
110         Distribution.Client.Configure
111         Distribution.Client.Dependency
112         Distribution.Client.Dependency.Types
113         Distribution.Client.DistDirLayout
114         Distribution.Client.Errors
115         Distribution.Client.Fetch
116         Distribution.Client.FetchUtils
117         Distribution.Client.FileMonitor
118         Distribution.Client.Freeze
119         Distribution.Client.GZipUtils
120         Distribution.Client.GenBounds
121         Distribution.Client.Get
122         Distribution.Client.Glob
123         Distribution.Client.GlobalFlags
124         Distribution.Client.Haddock
125         Distribution.Client.HashValue
126         Distribution.Client.HttpUtils
127         Distribution.Client.IndexUtils
128         Distribution.Client.IndexUtils.ActiveRepos
129         Distribution.Client.IndexUtils.IndexState
130         Distribution.Client.IndexUtils.Timestamp
131         Distribution.Client.Init
132         Distribution.Client.Init.Defaults
133         Distribution.Client.Init.FileCreators
134         Distribution.Client.Init.FlagExtractors
135         Distribution.Client.Init.Format
136         Distribution.Client.Init.Interactive.Command
137         Distribution.Client.Init.NonInteractive.Command
138         Distribution.Client.Init.NonInteractive.Heuristics
139         Distribution.Client.Init.Licenses
140         Distribution.Client.Init.Prompt
141         Distribution.Client.Init.Simple
142         Distribution.Client.Init.Types
143         Distribution.Client.Init.Utils
144         Distribution.Client.Install
145         Distribution.Client.InstallPlan
146         Distribution.Client.InstallSymlink
147         Distribution.Client.JobControl
148         Distribution.Client.List
149         Distribution.Client.Main
150         Distribution.Client.Manpage
151         Distribution.Client.ManpageFlags
152         Distribution.Client.Nix
153         Distribution.Client.NixStyleOptions
154         Distribution.Client.PackageHash
155         Distribution.Client.ParseUtils
156         Distribution.Client.ProjectBuilding
157         Distribution.Client.ProjectBuilding.UnpackedPackage
158         Distribution.Client.ProjectBuilding.PackageFileMonitor
159         Distribution.Client.ProjectBuilding.Types
160         Distribution.Client.ProjectConfig
161         Distribution.Client.ProjectConfig.Legacy
162         Distribution.Client.ProjectConfig.Types
163         Distribution.Client.ProjectFlags
164         Distribution.Client.ProjectOrchestration
165         Distribution.Client.ProjectPlanOutput
166         Distribution.Client.ProjectPlanning
167         Distribution.Client.ProjectPlanning.SetupPolicy
168         Distribution.Client.ProjectPlanning.Types
169         Distribution.Client.RebuildMonad
170         Distribution.Client.Reconfigure
171         Distribution.Client.ReplFlags
172         Distribution.Client.Run
173         Distribution.Client.Sandbox
174         Distribution.Client.Sandbox.PackageEnvironment
175         Distribution.Client.SavedFlags
176         Distribution.Client.ScriptUtils
177         Distribution.Client.Security.DNS
178         Distribution.Client.Security.HTTP
179         Distribution.Client.Setup
180         Distribution.Client.SetupWrapper
181         Distribution.Client.Signal
182         Distribution.Client.SolverInstallPlan
183         Distribution.Client.SourceFiles
184         Distribution.Client.SrcDist
185         Distribution.Client.Store
186         Distribution.Client.Tar
187         Distribution.Client.TargetProblem
188         Distribution.Client.TargetSelector
189         Distribution.Client.Targets
190         Distribution.Client.Types
191         Distribution.Client.Types.AllowNewer
192         Distribution.Client.Types.BuildResults
193         Distribution.Client.Types.ConfiguredId
194         Distribution.Client.Types.ConfiguredPackage
195         Distribution.Client.Types.Credentials
196         Distribution.Client.Types.InstallMethod
197         Distribution.Client.Types.OverwritePolicy
198         Distribution.Client.Types.PackageLocation
199         Distribution.Client.Types.PackageSpecifier
200         Distribution.Client.Types.ReadyPackage
201         Distribution.Client.Types.Repo
202         Distribution.Client.Types.RepoName
203         Distribution.Client.Types.SourcePackageDb
204         Distribution.Client.Types.SourceRepo
205         Distribution.Client.Types.WriteGhcEnvironmentFilesPolicy
206         Distribution.Client.Upload
207         Distribution.Client.Utils
208         Distribution.Client.Utils.Json
209         Distribution.Client.Utils.Parsec
210         Distribution.Client.VCS
211         Distribution.Client.Version
212         Distribution.Client.Win32SelfUpgrade
214     build-depends:
215         async      >= 2.0      && < 2.3,
216         array      >= 0.4      && < 0.6,
217         base16-bytestring >= 0.1.1 && < 1.1.0.0,
218         binary     >= 0.7.3    && < 0.9,
219         bytestring >= 0.10.6.0 && < 0.13,
220         containers >= 0.5.6.2  && < 0.8,
221         cryptohash-sha256 >= 0.11 && < 0.12,
222         directory  >= 1.3.7.0  && < 1.4,
223         echo       >= 0.1.3    && < 0.2,
224         edit-distance >= 0.2.2 && < 0.3,
225         exceptions >= 0.10.4   && < 0.11,
226         filepath   >= 1.4.0.0  && < 1.6,
227         hashable   >= 1.0      && < 1.5,
228         HTTP       >= 4000.1.5 && < 4000.5,
229         mtl        >= 2.0      && < 2.4,
230         network-uri >= 2.6.0.2 && < 2.7,
231         pretty     >= 1.1      && < 1.2,
232         process    >= 1.2.3.0  && < 1.7,
233         random     >= 1.2      && < 1.3,
234         stm        >= 2.0      && < 2.6,
235         tar        >= 0.5.0.3  && < 0.7,
236         time       >= 1.5.0.1  && < 1.13,
237         zlib       >= 0.5.3    && < 0.7,
238         hackage-security >= 0.6.2.0 && < 0.7,
239         text       >= 1.2.3    && < 1.3 || >= 2.0 && < 2.2,
240         parsec     >= 3.1.13.0 && < 3.2,
241         open-browser >= 0.2.1.0 && < 0.3,
242         regex-base  >= 0.94.0.0 && <0.95,
243         regex-posix >= 0.96.0.0 && <0.97,
244         safe-exceptions >= 0.1.7.0 && < 0.2,
245         semaphore-compat >= 1.0.0 && < 1.1
247     if flag(native-dns)
248       if os(windows)
249         build-depends: windns      >= 0.1.0 && < 0.2
250       else
251         build-depends: resolv      >= 0.1.1 && < 0.3
253     if os(windows)
254       -- newer directory for symlinks
255       build-depends: Win32 >= 2.8 && < 3, directory >=1.3.1.0
256     else
257       build-depends: unix >= 2.5 && < 2.9
259     if flag(lukko)
260       build-depends: lukko >= 0.1 && <0.2
262     -- pull in process version with fixed waitForProcess error
263     if impl(ghc >=8.2)
264       build-depends: process >= 1.6.15.0
267 executable cabal
268     import: warnings, base-dep
269     main-is: Main.hs
270     hs-source-dirs: main
271     default-language: Haskell2010
273     ghc-options: -rtsopts -threaded
275     -- On AIX, some legacy BSD operations such as flock(2) are provided by libbsd.a
276     if os(aix)
277         extra-libraries: bsd
279     build-depends:
280         cabal-install
282 -- Small, fast running tests.
284 test-suite unit-tests
285     import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
286     default-language: Haskell2010
287     default-extensions: TypeOperators
288     ghc-options: -rtsopts -threaded
290     type: exitcode-stdio-1.0
291     main-is: UnitTests.hs
292     hs-source-dirs: tests
293     other-modules:
294       UnitTests.Distribution.Client.ArbitraryInstances
295       UnitTests.Distribution.Client.BuildReport
296       UnitTests.Distribution.Client.Configure
297       UnitTests.Distribution.Client.FetchUtils
298       UnitTests.Distribution.Client.Get
299       UnitTests.Distribution.Client.Glob
300       UnitTests.Distribution.Client.GZipUtils
301       UnitTests.Distribution.Client.IndexUtils
302       UnitTests.Distribution.Client.IndexUtils.Timestamp
303       UnitTests.Distribution.Client.Init
304       UnitTests.Distribution.Client.Init.Golden
305       UnitTests.Distribution.Client.Init.Interactive
306       UnitTests.Distribution.Client.Init.NonInteractive
307       UnitTests.Distribution.Client.Init.Simple
308       UnitTests.Distribution.Client.Init.Utils
309       UnitTests.Distribution.Client.Init.FileCreators
310       UnitTests.Distribution.Client.InstallPlan
311       UnitTests.Distribution.Client.JobControl
312       UnitTests.Distribution.Client.ProjectConfig
313       UnitTests.Distribution.Client.ProjectPlanning
314       UnitTests.Distribution.Client.Store
315       UnitTests.Distribution.Client.Tar
316       UnitTests.Distribution.Client.Targets
317       UnitTests.Distribution.Client.TreeDiffInstances
318       UnitTests.Distribution.Client.UserConfig
319       UnitTests.Distribution.Solver.Modular.Builder
320       UnitTests.Distribution.Solver.Modular.RetryLog
321       UnitTests.Distribution.Solver.Modular.Solver
322       UnitTests.Distribution.Solver.Modular.DSL
323       UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
324       UnitTests.Distribution.Solver.Modular.WeightedPSQ
325       UnitTests.Distribution.Solver.Types.OptionalStanza
326       UnitTests.Options
328     build-depends:
329           array,
330           bytestring,
331           cabal-install,
332           Cabal-tree-diff,
333           Cabal-QuickCheck,
334           Cabal-tests,
335           containers,
336           directory,
337           filepath,
338           mtl,
339           network-uri >= 2.6.2.0 && <2.7,
340           random,
341           tar,
342           time,
343           zlib,
344           tasty >= 1.2.3 && <1.6,
345           tasty-golden >=2.3.1.1 && <2.4,
346           tasty-quickcheck,
347           tasty-hunit >= 0.10,
348           tree-diff,
349           QuickCheck >= 2.14.3 && <2.15
352 -- Tests to run with a limited stack and heap size
353 -- The test suite name must be keep short cause a longer one
354 -- could make the build generating paths which exceeds the windows
355 -- max path limit (still a problem for some ghc versions)
356 test-suite mem-use-tests
357   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
358   type: exitcode-stdio-1.0
359   main-is: MemoryUsageTests.hs
360   hs-source-dirs: tests
361   default-language: Haskell2010
363   ghc-options: -threaded -rtsopts "-with-rtsopts=-M16M -K1K"
365   other-modules:
366     UnitTests.Distribution.Solver.Modular.DSL
367     UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
368     UnitTests.Distribution.Solver.Modular.MemoryUsage
369     UnitTests.Options
371   build-depends:
372         cabal-install,
373         containers,
374         tasty >= 1.2.3 && <1.5,
375         tasty-hunit >= 0.10
378 -- Integration tests that use the cabal-install code directly
379 -- but still build whole projects
380 test-suite integration-tests2
381   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
382   ghc-options: -rtsopts -threaded
383   type: exitcode-stdio-1.0
384   main-is: IntegrationTests2.hs
385   hs-source-dirs: tests
386   default-language: Haskell2010
388   build-depends:
389         bytestring,
390         cabal-install,
391         containers,
392         directory,
393         filepath,
394         tasty >= 1.2.3 && <1.5,
395         tasty-hunit >= 0.10,
396         tagged
398 test-suite long-tests
399   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
400   ghc-options: -rtsopts -threaded
401   type: exitcode-stdio-1.0
402   hs-source-dirs: tests
403   main-is: LongTests.hs
404   default-language: Haskell2010
406   other-modules:
407     UnitTests.Distribution.Client.ArbitraryInstances
408     UnitTests.Distribution.Client.Described
409     UnitTests.Distribution.Client.DescribedInstances
410     UnitTests.Distribution.Client.FileMonitor
411     UnitTests.Distribution.Client.VCS
412     UnitTests.Distribution.Solver.Modular.DSL
413     UnitTests.Distribution.Solver.Modular.QuickCheck
414     UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
415     UnitTests.Options
417   build-depends:
418         Cabal-QuickCheck,
419         Cabal-described,
420         Cabal-tests,
421         cabal-install,
422         containers,
423         directory,
424         filepath,
425         hashable,
426         mtl,
427         network-uri >= 2.6.2.0 && <2.7,
428         random,
429         tagged,
430         tasty >= 1.2.3 && <1.5,
431         tasty-expected-failure,
432         tasty-hunit >= 0.10,
433         tasty-quickcheck,
434         QuickCheck >= 2.14 && <2.15,
435         pretty-show >= 1.6.15