packages feed

hackport-0.9.0.0: cabal/cabal-testsuite/cabal-testsuite.cabal

cabal-version: 2.2
name:          cabal-testsuite
version:       3
copyright:     2003-2023, Cabal Development Team (see AUTHORS file)
license:       BSD-3-Clause
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:      Test suite for Cabal and cabal-install
description:
  This package defines a shared test suite for Cabal and cabal-install.
category:       Distribution
build-type:     Custom

extra-source-files:
  README.md

source-repository head
  type:     git
  location: https://github.com/haskell/cabal/
  subdir:   cabal-testsuite

common shared
  default-language: Haskell2010

  build-depends:
    , base >= 4.9 && <4.20
    -- this needs to match the in-tree lib:Cabal version
    , Cabal ^>= 3.10.3.0
    , Cabal-syntax ^>= 3.10.3.0

  ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns


library
  import: shared

  hs-source-dirs: src
  exposed-modules:
    Test.Cabal.CheckArMetadata
    Test.Cabal.DecodeShowBuildInfo
    Test.Cabal.Monad
    Test.Cabal.OutputNormalizer
    Test.Cabal.Plan
    Test.Cabal.Prelude
    Test.Cabal.Run
    Test.Cabal.Script
    Test.Cabal.Server
    Test.Cabal.TestCode
    Test.Cabal.Workdir

  other-modules:
    Test.Cabal.ScriptEnv0
  autogen-modules:
    Test.Cabal.ScriptEnv0

  build-depends:
    , aeson                 ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0 || ^>= 2.2.1.0
    , async                 ^>= 2.2.1
    , attoparsec            ^>= 0.13.2.2 || ^>=0.14.1
    , base16-bytestring     ^>= 0.1.1.5 || ^>= 1.0
    , bytestring            ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
    , containers            ^>= 0.5.0.0 || ^>= 0.6.0.1 || ^>= 0.7
    , cryptohash-sha256     ^>= 0.11.101.0
    , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0
    , exceptions            ^>= 0.10.0
    , filepath              ^>= 1.3.0.1 || ^>= 1.4.0.0 || ^>= 1.5.0.0
    , network-wait          ^>= 0.1.2.0 || ^>= 0.2.0.0
    , optparse-applicative  ^>= 0.14.3.0 || ^>=0.15.1.0 || ^>=0.16.0.0 || ^>= 0.17.0.0 || ^>= 0.18.1.0
    , process               ^>= 1.2.1.0 || ^>= 1.4.2.0 || ^>= 1.6.1.0
    , regex-base            ^>= 0.94.0.1
    , regex-tdfa            ^>= 1.2.3.1 || ^>=1.3.1.0
    , retry                 ^>= 0.9.1.0
    , array                 ^>= 0.4.0.1 || ^>= 0.5.0.0
    , temporary             ^>= 1.3
    , text                  ^>= 1.2.3.1 || ^>= 2.0.1   || ^>= 2.1
    , transformers          ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0 || ^>= 0.6.0.2

  if !os(windows)
    build-depends:
      , unix                ^>= 2.6.0.0 || ^>= 2.7.0.0 || ^>= 2.8.0.0
  else
    build-depends:
      , Win32

executable cabal-tests
  import: shared
  main-is: cabal-tests.hs
  hs-source-dirs: main
  ghc-options: -threaded
  build-depends:
    , cabal-testsuite
    -- constraints inherited via lib:cabal-testsuite component
    , async
    , exceptions
    , filepath
    , optparse-applicative
    , process
    , transformers
    -- dependencies specific to exe:cabal-tests
    , clock                 ^>= 0.7.2 || ^>=0.8

  build-tool-depends: cabal-testsuite:setup
  default-extensions: TypeOperators

-- this executable is needed by lib:cabal-testsuite
executable setup
  import: shared
  main-is: Setup.simple.hs

custom-setup
  -- we only depend on even stable releases of lib:Cabal
  -- and due to Custom complexity and ConstraintSetupCabalMaxVersion
  -- it has to be the latest release version plus
  -- you have to use the latest cabal-install release
  setup-depends: Cabal == 3.10.3.0,
                 Cabal-syntax == 3.10.3.0,
                 base, filepath, directory