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