Cabal.cabal 11.8 KB
Newer Older
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
1 2
name:          Cabal
version:       1.25.0.0
3
copyright:     2003-2016, Cabal Development Team (see AUTHORS file)
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
4 5 6 7 8 9 10
license:       BSD3
license-file:  LICENSE
author:        Cabal Development Team <cabal-devel@haskell.org>
maintainer:    cabal-devel@haskell.org
homepage:      http://www.haskell.org/cabal/
bug-reports:   https://github.com/haskell/cabal/issues
synopsis:      A framework for packaging Haskell software
11
description:
12 13 14 15 16 17
  The Haskell Common Architecture for Building Applications and
  Libraries: a framework defining a common interface for authors to more
  easily build their Haskell applications in a portable way.
  .
  The Haskell Cabal is part of a larger infrastructure for distributing,
  organizing, and cataloging Haskell libraries and tools.
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
18 19 20
category:       Distribution
cabal-version:  >=1.10
build-type:     Simple
21 22
-- If we use a new Cabal feature, this needs to be changed to Custom so
-- we can bootstrap.
23

24
extra-source-files:
25
  README.md tests/README.md changelog
26 27 28 29
  doc/bugs-and-stability.rst doc/concepts-and-development.rst
  doc/conf.py doc/config-and-install.rst doc/developing-packages.rst
  doc/images/Cabal-dark.png doc/index.rst doc/installing-packages.rst
  doc/intro.rst doc/misc.rst doc/nix-local-build-overview.rst
30
  doc/nix-local-build.rst doc/README.md doc/references.inc
31

32 33 34
  -- Generated with 'misc/gen-extra-source-files.sh'
  -- Do NOT edit this section manually; instead, run the script.
  -- BEGIN gen-extra-source-files
Oleg Grenrus's avatar
Oleg Grenrus committed
35
  tests/ParserTests/warnings/bom.cabal
Oleg Grenrus's avatar
Oleg Grenrus committed
36 37 38 39
  tests/ParserTests/warnings/bool.cabal
  tests/ParserTests/warnings/deprecatedfield.cabal
  tests/ParserTests/warnings/extratestmodule.cabal
  tests/ParserTests/warnings/gluedop.cabal
Oleg Grenrus's avatar
Oleg Grenrus committed
40
  tests/ParserTests/warnings/nbsp.cabal
Oleg Grenrus's avatar
Oleg Grenrus committed
41 42 43 44 45 46 47 48
  tests/ParserTests/warnings/newsyntax.cabal
  tests/ParserTests/warnings/oldsyntax.cabal
  tests/ParserTests/warnings/subsection.cabal
  tests/ParserTests/warnings/trailingfield.cabal
  tests/ParserTests/warnings/unknownfield.cabal
  tests/ParserTests/warnings/unknownsection.cabal
  tests/ParserTests/warnings/utf8.cabal
  tests/ParserTests/warnings/versiontag.cabal
49 50
  tests/hackage/check.sh
  tests/hackage/download.sh
51 52
  tests/hackage/unpack.sh
  tests/misc/ghc-supported-languages.hs
53
  -- END gen-extra-source-files
54

55
source-repository head
56 57
  type:     git
  location: https://github.com/haskell/cabal/
58
  subdir:   Cabal
59

60 61 62
flag bundled-binary-generic
  default: False

63 64 65 66
flag old-directory
  description:  Use directory < 1.2 and old-time
  default:      False

Oleg Grenrus's avatar
Oleg Grenrus committed
67 68 69 70 71
flag parsec
  description:  Use parsec parser
  default:      False
  manual:       True

Oleg Grenrus's avatar
Oleg Grenrus committed
72 73 74 75 76
flag parsec-struct-diff
  description:  Use StructDiff in parsec tests. Affects only parsec tests.
  default:      False
  manual:       True

77
library
78
  build-depends:
79 80 81 82
    array      >= 0.1 && < 0.6,
    base       >= 4.5 && < 5,
    bytestring >= 0.9 && < 1,
    containers >= 0.4 && < 0.6,
83
    deepseq    >= 1.3 && < 1.5,
84 85
    filepath   >= 1.3 && < 1.5,
    pretty     >= 1.1 && < 1.2,
86
    process    >= 1.1.0.1 && < 1.5,
87
    time       >= 1.4 && < 1.7
88

89 90 91 92 93 94 95
  if flag(old-directory)
    build-depends: directory >= 1.1 && < 1.2, old-time >= 1 && < 1.2,
                   process   >= 1.0.1.1  && < 1.1.0.2
  else
    build-depends: directory >= 1.2 && < 1.3,
                   process   >= 1.1.0.2  && < 1.5

96 97 98
  if flag(bundled-binary-generic)
    build-depends: binary >= 0.5 && < 0.7
  else
99
    build-depends: binary >= 0.7 && < 0.9
100

ttuegel's avatar
ttuegel committed
101 102 103 104
  -- Needed for GHC.Generics before GHC 7.6
  if impl(ghc < 7.6)
    build-depends: ghc-prim >= 0.2 && < 0.3

105
  if !os(windows)
106
    build-depends:
107
      unix >= 2.5 && < 2.8
108

Ben Gamari's avatar
Ben Gamari committed
109 110 111 112
  if os(windows)
    build-depends:
      Win32 >= 2.2 && < 2.4

113
  ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs
114
  if impl(ghc >= 8.0)
115 116
    ghc-options: -Wcompat -Wnoncanonical-monad-instances
                 -Wnoncanonical-monadfail-instances
117

118
  exposed-modules:
119
    Distribution.Backpack
120 121 122 123 124 125 126 127 128
    Distribution.Backpack.Configure
    Distribution.Backpack.ComponentsGraph
    Distribution.Backpack.ConfiguredComponent
    Distribution.Backpack.FullUnitId
    Distribution.Backpack.LinkedComponent
    Distribution.Backpack.ModSubst
    Distribution.Backpack.ModuleShape
    Distribution.Utils.LogProgress
    Distribution.Utils.MapAccum
ttuegel's avatar
ttuegel committed
129
    Distribution.Compat.CreatePipe
130
    Distribution.Compat.Environment
131
    Distribution.Compat.Exception
132
    Distribution.Compat.Graph
133
    Distribution.Compat.Internal.TempFile
134
    Distribution.Compat.Prelude.Internal
135
    Distribution.Compat.ReadP
136
    Distribution.Compat.Semigroup
137
    Distribution.Compat.Stack
138
    Distribution.Compat.Time
139
    Distribution.Compat.DList
140 141 142 143 144 145
    Distribution.Compiler
    Distribution.InstalledPackageInfo
    Distribution.License
    Distribution.Make
    Distribution.ModuleName
    Distribution.Package
146
    Distribution.Package.TextClass
147 148 149 150 151 152 153
    Distribution.PackageDescription
    Distribution.PackageDescription.Check
    Distribution.PackageDescription.Configuration
    Distribution.PackageDescription.Parse
    Distribution.PackageDescription.PrettyPrint
    Distribution.PackageDescription.Utils
    Distribution.ParseUtils
Oleg Grenrus's avatar
Oleg Grenrus committed
154
    Distribution.PrettyUtils
155 156 157 158 159 160 161 162 163 164 165 166 167
    Distribution.ReadE
    Distribution.Simple
    Distribution.Simple.Bench
    Distribution.Simple.Build
    Distribution.Simple.Build.Macros
    Distribution.Simple.Build.PathsModule
    Distribution.Simple.BuildPaths
    Distribution.Simple.BuildTarget
    Distribution.Simple.CCompiler
    Distribution.Simple.Command
    Distribution.Simple.Compiler
    Distribution.Simple.Configure
    Distribution.Simple.GHC
168
    Distribution.Simple.GHCJS
169
    Distribution.Simple.Haddock
170
    Distribution.Simple.HaskellSuite
171 172 173 174 175 176 177 178 179 180 181 182 183
    Distribution.Simple.Hpc
    Distribution.Simple.Install
    Distribution.Simple.InstallDirs
    Distribution.Simple.JHC
    Distribution.Simple.LHC
    Distribution.Simple.LocalBuildInfo
    Distribution.Simple.PackageIndex
    Distribution.Simple.PreProcess
    Distribution.Simple.PreProcess.Unlit
    Distribution.Simple.Program
    Distribution.Simple.Program.Ar
    Distribution.Simple.Program.Builtin
    Distribution.Simple.Program.Db
184
    Distribution.Simple.Program.Find
185 186 187
    Distribution.Simple.Program.GHC
    Distribution.Simple.Program.HcPkg
    Distribution.Simple.Program.Hpc
188
    Distribution.Simple.Program.Internal
189 190 191
    Distribution.Simple.Program.Ld
    Distribution.Simple.Program.Run
    Distribution.Simple.Program.Script
Mikhail Glushenkov's avatar
Mikhail Glushenkov committed
192
    Distribution.Simple.Program.Strip
193 194 195 196 197
    Distribution.Simple.Program.Types
    Distribution.Simple.Register
    Distribution.Simple.Setup
    Distribution.Simple.SrcDist
    Distribution.Simple.Test
ttuegel's avatar
ttuegel committed
198 199 200
    Distribution.Simple.Test.ExeV10
    Distribution.Simple.Test.LibV09
    Distribution.Simple.Test.Log
201 202 203 204 205 206
    Distribution.Simple.UHC
    Distribution.Simple.UserHooks
    Distribution.Simple.Utils
    Distribution.System
    Distribution.TestSuite
    Distribution.Text
207 208 209 210 211 212 213
    Distribution.Types.Benchmark
    Distribution.Types.BenchmarkInterface
    Distribution.Types.BenchmarkType
    Distribution.Types.BuildInfo
    Distribution.Types.BuildType
    Distribution.Types.Executable
    Distribution.Types.Library
214 215 216
    Distribution.Types.ForeignLib
    Distribution.Types.ForeignLibType
    Distribution.Types.ForeignLibOption
217 218
    Distribution.Types.ModuleReexport
    Distribution.Types.ModuleRenaming
219
    Distribution.Types.IncludeRenaming
220
    Distribution.Types.Mixin
221 222 223 224 225 226 227 228 229 230 231 232
    Distribution.Types.SetupBuildInfo
    Distribution.Types.TestSuite
    Distribution.Types.TestSuiteInterface
    Distribution.Types.TestType
    Distribution.Types.ComponentName
    Distribution.Types.GenericPackageDescription
    Distribution.Types.HookedBuildInfo
    Distribution.Types.PackageDescription
    Distribution.Types.SourceRepo
    Distribution.Types.Component
    Distribution.Types.ComponentLocalBuildInfo
    Distribution.Types.LocalBuildInfo
233
    Distribution.Types.ComponentRequestedSpec
234
    Distribution.Types.TargetInfo
235
    Distribution.Utils.NubList
236
    Distribution.Utils.ShortText
237
    Distribution.Utils.Progress
238
    Distribution.Utils.BinaryWithFingerprint
239 240
    Distribution.Verbosity
    Distribution.Version
241
    Language.Haskell.Extension
242
    Distribution.Compat.Binary
243

Oleg Grenrus's avatar
Oleg Grenrus committed
244 245 246 247 248 249
  if flag(parsec)
    cpp-options: -DCABAL_PARSEC
    build-depends:
      transformers,
      parsec >= 3.1.9 && <3.2
    build-tools:
Oleg Grenrus's avatar
Oleg Grenrus committed
250
      alex >=3.1.4 && <3.3
Oleg Grenrus's avatar
Oleg Grenrus committed
251 252 253 254 255 256 257 258 259 260 261 262 263 264
    exposed-modules:
      Distribution.Compat.Parsec
      Distribution.PackageDescription.Parsec
      Distribution.PackageDescription.Parsec.FieldDescr
      Distribution.Parsec.Class
      Distribution.Parsec.ConfVar
      Distribution.Parsec.Lexer
      Distribution.Parsec.LexerMonad
      Distribution.Parsec.Parser
      Distribution.Parsec.Types.Common
      Distribution.Parsec.Types.Field
      Distribution.Parsec.Types.FieldDescr
      Distribution.Parsec.Types.ParseResult

265
  other-modules:
266 267 268 269 270 271 272
    Distribution.Backpack.PreExistingComponent
    Distribution.Backpack.ReadyComponent
    Distribution.Backpack.MixLink
    Distribution.Backpack.ModuleScope
    Distribution.Backpack.UnifyM
    Distribution.Backpack.Id
    Distribution.Utils.UnionFind
273
    Distribution.Utils.Base62
274
    Distribution.Compat.CopyFile
275
    Distribution.Compat.GetShortPathName
276
    Distribution.Compat.MonadFail
277
    Distribution.Compat.Prelude
278
    Distribution.Compat.SnocList
279
    Distribution.GetOpt
280
    Distribution.Lex
281
    Distribution.Utils.String
282
    Distribution.Simple.GHC.Internal
283
    Distribution.Simple.GHC.IPI642
284
    Distribution.Simple.GHC.IPIConvert
285
    Distribution.Simple.GHC.ImplInfo
286
    Paths_Cabal
287

288 289 290 291 292
  if flag(bundled-binary-generic)
    other-modules:
      Distribution.Compat.Binary.Class
      Distribution.Compat.Binary.Generic

293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
  default-language: Haskell2010
  other-extensions:
    BangPatterns
    CPP
    DefaultSignatures
    DeriveDataTypeable
    DeriveFoldable
    DeriveFunctor
    DeriveGeneric
    DeriveTraversable
    ExistentialQuantification
    FlexibleContexts
    FlexibleInstances
    GeneralizedNewtypeDeriving
    ImplicitParams
    KindSignatures
    NondecreasingIndentation
    OverloadedStrings
    RankNTypes
    RecordWildCards
    ScopedTypeVariables
    StandaloneDeriving
    Trustworthy
    TypeFamilies
    TypeOperators
    TypeSynonymInstances
    UndecidableInstances

  if impl(ghc >= 7.11)
    other-extensions: PatternSynonyms
323

324
-- Small, fast running tests.
325 326
test-suite unit-tests
  type: exitcode-stdio-1.0
327
  hs-source-dirs: tests
328
  other-modules:
329 330
    Test.Laws
    Test.QuickCheck.Utils
331 332
    UnitTests.Distribution.Compat.CreatePipe
    UnitTests.Distribution.Compat.ReadP
333
    UnitTests.Distribution.Compat.Time
334
    UnitTests.Distribution.Compat.Graph
335
    UnitTests.Distribution.Simple.Program.Internal
336
    UnitTests.Distribution.Simple.Utils
337
    UnitTests.Distribution.System
338
    UnitTests.Distribution.Utils.NubList
339
    UnitTests.Distribution.Utils.ShortText
340
    UnitTests.Distribution.Version
341
  main-is: UnitTests.hs
342
  build-depends:
343
    array,
344
    base,
345
    containers,
346
    directory,
347
    filepath,
348 349 350
    tasty,
    tasty-hunit,
    tasty-quickcheck,
351
    tagged,
352
    pretty,
Oleg Grenrus's avatar
Oleg Grenrus committed
353
    QuickCheck >= 2.7 && < 2.10,
354
    Cabal
tibbe's avatar
tibbe committed
355
  ghc-options: -Wall
356
  default-language: Haskell2010
357

Oleg Grenrus's avatar
Oleg Grenrus committed
358 359 360 361 362
test-suite parser-tests
  if !flag(parsec)
    buildable: False

  type: exitcode-stdio-1.0
Oleg Grenrus's avatar
Oleg Grenrus committed
363
  hs-source-dirs: tests
Oleg Grenrus's avatar
Oleg Grenrus committed
364
  main-is: ParserTests.hs
Oleg Grenrus's avatar
Oleg Grenrus committed
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
  build-depends:
    base,
    bytestring,
    filepath,
    tasty,
    tasty-hunit,
    tasty-quickcheck,
    Cabal
  ghc-options: -Wall
  default-language: Haskell2010

test-suite parser-hackage-tests
  if !flag(parsec)
    buildable: False

  type: exitcode-stdio-1.0
  main-is: ParserHackageTests.hs
Oleg Grenrus's avatar
Oleg Grenrus committed
382

Oleg Grenrus's avatar
Oleg Grenrus committed
383 384 385 386 387 388 389 390 391
  hs-source-dirs: tests
  build-depends:
    base,
    containers,
    tar >=0.5 && <0.6,
    bytestring,
    directory,
    filepath,
    Cabal
Oleg Grenrus's avatar
Oleg Grenrus committed
392 393 394 395 396 397 398 399 400 401 402 403

  if flag(parsec-struct-diff)
    build-depends:
      generics-sop ==0.2.*,
      these >=0.7.1 && <0.8,
      singleton-bool >=0.1.1.0 && <0.2,
      keys
    other-modules:
      DiffInstances
      StructDiff
    cpp-options: -DHAS_STRUCT_DIFF

Oleg Grenrus's avatar
Oleg Grenrus committed
404 405 406
  ghc-options: -Wall -rtsopts
  default-extensions: CPP
  default-language: Haskell2010