[ mergify ] fix condition of 'merge delay passed' label (#8448)
[cabal.git] / cabal-install / cabal-install.cabal
blob44e841a4fb40d9e4df763b8757729e21f67872ee
1 Cabal-Version:      2.2
3 Name:               cabal-install
4 Version:            3.9.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-2022, 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 >=8.10)
46       ghc-options: -Wunused-packages
48 common base-dep
49     build-depends: base >=4.10 && <4.17
51 common cabal-dep
52     build-depends: Cabal ^>=3.9
54 common cabal-syntax-dep
55     build-depends: Cabal-syntax ^>=3.9
57 common cabal-install-solver-dep
58     build-depends: cabal-install-solver ^>=3.9
60 library
61     import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
62     default-language: Haskell2010
64     hs-source-dirs:   src
65     exposed-modules:
66         -- this modules are moved from Cabal
67         -- they are needed for as long until cabal-install moves to parsec parser
68         Distribution.Deprecated.ParseUtils
69         Distribution.Deprecated.ReadP
70         Distribution.Deprecated.ViewAsFieldDescr
72         Distribution.Client.BuildReports.Anonymous
73         Distribution.Client.BuildReports.Lens
74         Distribution.Client.BuildReports.Storage
75         Distribution.Client.BuildReports.Types
76         Distribution.Client.BuildReports.Upload
77         Distribution.Client.Check
78         Distribution.Client.CmdBench
79         Distribution.Client.CmdBuild
80         Distribution.Client.CmdClean
81         Distribution.Client.CmdConfigure
82         Distribution.Client.CmdErrorMessages
83         Distribution.Client.CmdExec
84         Distribution.Client.CmdFreeze
85         Distribution.Client.CmdHaddock
86         Distribution.Client.CmdHaddockProject
87         Distribution.Client.CmdInstall
88         Distribution.Client.CmdInstall.ClientInstallFlags
89         Distribution.Client.CmdInstall.ClientInstallTargetSelector
90         Distribution.Client.CmdLegacy
91         Distribution.Client.CmdListBin
92         Distribution.Client.CmdOutdated
93         Distribution.Client.CmdRepl
94         Distribution.Client.CmdRun
95         Distribution.Client.CmdSdist
96         Distribution.Client.CmdTest
97         Distribution.Client.CmdUpdate
98         Distribution.Client.Compat.Directory
99         Distribution.Client.Compat.ExecutablePath
100         Distribution.Client.Compat.Orphans
101         Distribution.Client.Compat.Prelude
102         Distribution.Client.Compat.Semaphore
103         Distribution.Client.Config
104         Distribution.Client.Configure
105         Distribution.Client.Dependency
106         Distribution.Client.Dependency.Types
107         Distribution.Client.DistDirLayout
108         Distribution.Client.Fetch
109         Distribution.Client.FetchUtils
110         Distribution.Client.FileMonitor
111         Distribution.Client.Freeze
112         Distribution.Client.GZipUtils
113         Distribution.Client.GenBounds
114         Distribution.Client.Get
115         Distribution.Client.Glob
116         Distribution.Client.GlobalFlags
117         Distribution.Client.Haddock
118         Distribution.Client.HashValue
119         Distribution.Client.HttpUtils
120         Distribution.Client.IndexUtils
121         Distribution.Client.IndexUtils.ActiveRepos
122         Distribution.Client.IndexUtils.IndexState
123         Distribution.Client.IndexUtils.Timestamp
124         Distribution.Client.Init
125         Distribution.Client.Init.Defaults
126         Distribution.Client.Init.FileCreators
127         Distribution.Client.Init.FlagExtractors
128         Distribution.Client.Init.Format
129         Distribution.Client.Init.Interactive.Command
130         Distribution.Client.Init.NonInteractive.Command
131         Distribution.Client.Init.NonInteractive.Heuristics
132         Distribution.Client.Init.Licenses
133         Distribution.Client.Init.Prompt
134         Distribution.Client.Init.Simple
135         Distribution.Client.Init.Types
136         Distribution.Client.Init.Utils
137         Distribution.Client.Install
138         Distribution.Client.InstallPlan
139         Distribution.Client.InstallSymlink
140         Distribution.Client.JobControl
141         Distribution.Client.List
142         Distribution.Client.Manpage
143         Distribution.Client.ManpageFlags
144         Distribution.Client.Nix
145         Distribution.Client.NixStyleOptions
146         Distribution.Client.PackageHash
147         Distribution.Client.ParseUtils
148         Distribution.Client.ProjectBuilding
149         Distribution.Client.ProjectBuilding.Types
150         Distribution.Client.ProjectConfig
151         Distribution.Client.ProjectConfig.Legacy
152         Distribution.Client.ProjectConfig.Types
153         Distribution.Client.ProjectFlags
154         Distribution.Client.ProjectOrchestration
155         Distribution.Client.ProjectPlanOutput
156         Distribution.Client.ProjectPlanning
157         Distribution.Client.ProjectPlanning.Types
158         Distribution.Client.RebuildMonad
159         Distribution.Client.Reconfigure
160         Distribution.Client.Run
161         Distribution.Client.Sandbox
162         Distribution.Client.Sandbox.PackageEnvironment
163         Distribution.Client.SavedFlags
164         Distribution.Client.ScriptUtils
165         Distribution.Client.Security.DNS
166         Distribution.Client.Security.HTTP
167         Distribution.Client.Setup
168         Distribution.Client.SetupWrapper
169         Distribution.Client.Signal
170         Distribution.Client.SolverInstallPlan
171         Distribution.Client.SourceFiles
172         Distribution.Client.SrcDist
173         Distribution.Client.Store
174         Distribution.Client.Tar
175         Distribution.Client.TargetProblem
176         Distribution.Client.TargetSelector
177         Distribution.Client.Targets
178         Distribution.Client.Types
179         Distribution.Client.Types.AllowNewer
180         Distribution.Client.Types.BuildResults
181         Distribution.Client.Types.ConfiguredId
182         Distribution.Client.Types.ConfiguredPackage
183         Distribution.Client.Types.Credentials
184         Distribution.Client.Types.InstallMethod
185         Distribution.Client.Types.OverwritePolicy
186         Distribution.Client.Types.PackageLocation
187         Distribution.Client.Types.PackageSpecifier
188         Distribution.Client.Types.ReadyPackage
189         Distribution.Client.Types.Repo
190         Distribution.Client.Types.RepoName
191         Distribution.Client.Types.SourcePackageDb
192         Distribution.Client.Types.SourceRepo
193         Distribution.Client.Types.WriteGhcEnvironmentFilesPolicy
194         Distribution.Client.Upload
195         Distribution.Client.Utils
196         Distribution.Client.Utils.Json
197         Distribution.Client.Utils.Parsec
198         Distribution.Client.VCS
199         Distribution.Client.Version
200         Distribution.Client.Win32SelfUpgrade
202     build-depends:
203         async      >= 2.0      && < 2.3,
204         array      >= 0.4      && < 0.6,
205         base16-bytestring >= 0.1.1 && < 1.1.0.0,
206         binary     >= 0.7.3    && < 0.9,
207         bytestring >= 0.10.6.0 && < 0.12,
208         containers >= 0.5.6.2  && < 0.7,
209         cryptohash-sha256 >= 0.11 && < 0.12,
210         directory  >= 1.2.2.0  && < 1.4,
211         echo       >= 0.1.3    && < 0.2,
212         edit-distance >= 0.2.2 && < 0.3,
213         exceptions >= 0.10.4   && < 0.11,
214         filepath   >= 1.4.0.0  && < 1.5,
215         hashable   >= 1.0      && < 1.5,
216         HTTP       >= 4000.1.5 && < 4000.5,
217         mtl        >= 2.0      && < 2.3,
218         network-uri >= 2.6.0.2 && < 2.7,
219         pretty     >= 1.1      && < 1.2,
220         process    >= 1.2.3.0  && < 1.7,
221         random     >= 1.2      && < 1.3,
222         stm        >= 2.0      && < 2.6,
223         tar        >= 0.5.0.3  && < 0.6,
224         time       >= 1.5.0.1  && < 1.13,
225         zlib       >= 0.5.3    && < 0.7,
226         hackage-security >= 0.6.2.0 && < 0.7,
227         text       >= 1.2.3    && < 1.3 || >= 2.0 && < 2.1,
228         parsec     >= 3.1.13.0 && < 3.2,
229         regex-base  >= 0.94.0.0 && <0.95,
230         regex-posix >= 0.96.0.0 && <0.97,
231         safe-exceptions >= 0.1.7.0 && < 0.2
233     if flag(native-dns)
234       if os(windows)
235         build-depends: windns      >= 0.1.0 && < 0.2
236       else
237         build-depends: resolv      >= 0.1.1 && < 0.2
239     if os(windows)
240       -- newer directory for symlinks
241       build-depends: Win32 >= 2.8 && < 3, directory >=1.3.1.0
242     else
243       build-depends: unix >= 2.5 && < 2.9
245     if flag(lukko)
246       build-depends: lukko >= 0.1 && <0.2
248    -- pull in process version with fixed waitForProcess error
249    if impl(ghc >=8.2)
250      build-depends: process >= 1.6.15.0
253 executable cabal
254     import: warnings, base-dep, cabal-dep, cabal-syntax-dep
255     main-is: Main.hs
256     hs-source-dirs: main
257     default-language: Haskell2010
259     ghc-options: -rtsopts -threaded
261     -- On AIX, some legacy BSD operations such as flock(2) are provided by libbsd.a
262     if os(aix)
263         extra-libraries: bsd
265     build-depends:
266         cabal-install,
267         directory,
268         filepath
270 -- Small, fast running tests.
272 test-suite unit-tests
273     import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
274     default-language: Haskell2010
275     ghc-options: -rtsopts -threaded
277     type: exitcode-stdio-1.0
278     main-is: UnitTests.hs
279     hs-source-dirs: tests
280     other-modules:
281       UnitTests.Distribution.Client.ArbitraryInstances
282       UnitTests.Distribution.Client.BuildReport
283       UnitTests.Distribution.Client.Configure
284       UnitTests.Distribution.Client.FetchUtils
285       UnitTests.Distribution.Client.Get
286       UnitTests.Distribution.Client.Glob
287       UnitTests.Distribution.Client.GZipUtils
288       UnitTests.Distribution.Client.IndexUtils
289       UnitTests.Distribution.Client.IndexUtils.Timestamp
290       UnitTests.Distribution.Client.Init
291       UnitTests.Distribution.Client.Init.Golden
292       UnitTests.Distribution.Client.Init.Interactive
293       UnitTests.Distribution.Client.Init.NonInteractive
294       UnitTests.Distribution.Client.Init.Simple
295       UnitTests.Distribution.Client.Init.Utils
296       UnitTests.Distribution.Client.Init.FileCreators
297       UnitTests.Distribution.Client.InstallPlan
298       UnitTests.Distribution.Client.JobControl
299       UnitTests.Distribution.Client.ProjectConfig
300       UnitTests.Distribution.Client.ProjectPlanning
301       UnitTests.Distribution.Client.Store
302       UnitTests.Distribution.Client.Tar
303       UnitTests.Distribution.Client.Targets
304       UnitTests.Distribution.Client.TreeDiffInstances
305       UnitTests.Distribution.Client.UserConfig
306       UnitTests.Distribution.Solver.Modular.Builder
307       UnitTests.Distribution.Solver.Modular.RetryLog
308       UnitTests.Distribution.Solver.Modular.Solver
309       UnitTests.Distribution.Solver.Modular.DSL
310       UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
311       UnitTests.Distribution.Solver.Modular.WeightedPSQ
312       UnitTests.Distribution.Solver.Types.OptionalStanza
313       UnitTests.Options
314       UnitTests.TempTestDir
316     build-depends:
317           array,
318           bytestring,
319           cabal-install,
320           Cabal-tree-diff,
321           Cabal-QuickCheck,
322           containers,
323           directory,
324           filepath,
325           mtl,
326           network-uri >= 2.6.2.0 && <2.7,
327           random,
328           tar,
329           time,
330           zlib,
331           tasty >= 1.2.3 && <1.5,
332           tasty-golden >=2.3.1.1 && <2.4,
333           tasty-quickcheck,
334           tasty-hunit >= 0.10,
335           tree-diff,
336           QuickCheck >= 2.14 && <2.15
339 -- Tests to run with a limited stack and heap size
340 -- The test suite name must be keep short cause a longer one
341 -- could make the build generating paths which exceeds the windows
342 -- max path limit (still a problem for some ghc versions)
343 test-suite mem-use-tests
344   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
345   type: exitcode-stdio-1.0
346   main-is: MemoryUsageTests.hs
347   hs-source-dirs: tests
348   default-language: Haskell2010
350   ghc-options: -threaded -rtsopts "-with-rtsopts=-M16M -K1K"
352   other-modules:
353     UnitTests.Distribution.Solver.Modular.DSL
354     UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
355     UnitTests.Distribution.Solver.Modular.MemoryUsage
356     UnitTests.Options
358   build-depends:
359         cabal-install,
360         containers,
361         tasty >= 1.2.3 && <1.5,
362         tasty-hunit >= 0.10
365 -- Integration tests that use the cabal-install code directly
366 -- but still build whole projects
367 test-suite integration-tests2
368   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
369   ghc-options: -rtsopts -threaded
370   type: exitcode-stdio-1.0
371   main-is: IntegrationTests2.hs
372   hs-source-dirs: tests
373   default-language: Haskell2010
375   build-depends:
376         bytestring,
377         cabal-install,
378         containers,
379         directory,
380         filepath,
381         tasty >= 1.2.3 && <1.5,
382         tasty-hunit >= 0.10,
383         tagged
385 test-suite long-tests
386   import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
387   ghc-options: -rtsopts -threaded
388   type: exitcode-stdio-1.0
389   hs-source-dirs: tests
390   main-is: LongTests.hs
391   default-language: Haskell2010
393   other-modules:
394     UnitTests.Distribution.Client.ArbitraryInstances
395     UnitTests.Distribution.Client.Described
396     UnitTests.Distribution.Client.DescribedInstances
397     UnitTests.Distribution.Client.FileMonitor
398     UnitTests.Distribution.Client.VCS
399     UnitTests.Distribution.Solver.Modular.DSL
400     UnitTests.Distribution.Solver.Modular.QuickCheck
401     UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
402     UnitTests.Options
403     UnitTests.TempTestDir
405   build-depends:
406         Cabal-QuickCheck,
407         Cabal-described,
408         cabal-install,
409         containers,
410         directory,
411         filepath,
412         hashable,
413         mtl,
414         network-uri >= 2.6.2.0 && <2.7,
415         random,
416         tagged,
417         tasty >= 1.2.3 && <1.5,
418         tasty-expected-failure,
419         tasty-hunit >= 0.10,
420         tasty-quickcheck,
421         QuickCheck >= 2.14 && <2.15,
422         pretty-show >= 1.6.15