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