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