cabal-version:       2.4
name:                hackage-cli
version:             0.0.3.4

synopsis:            CLI tool for Hackage
description:
  With @hackage-cli@ you can manage @.cabal@ files,
  e.g. (bulk-)upload revised variants.
homepage:            https://github.com/hackage-trustees/hackage-cli
bug-reports:         https://github.com/hackage-trustees/hackage-cli/issues
license:             GPL-3.0-or-later
license-file:        LICENSE
author:              Herbert Valerio Riedel
maintainer:          Andreas Abel
category:            Development
build-type:          Simple

tested-with:
  -- Keep in descending order.
  GHC == 9.0.2
  GHC == 8.10.7
  GHC == 8.8.4
  GHC == 8.6.5
  GHC == 8.4.4
  GHC == 8.2.2

extra-source-files:
  CHANGELOG.md
  README.md
  fixtures/*.diff
  fixtures/*.cabal

source-repository head
  Type:     git
  Location: https://github.com/hackage-trustees/hackage-cli.git

library cabal-revisions
  X-SPDX-License-Identifier: BSD-3-Clause
  default-language:    Haskell2010
  hs-source-dirs:      lib
  ghc-options:         -Wall -Wcompat

  build-depends:
    , base         >= 4.10.0.0 && < 4.16
    , bytestring   >= 0.10.4.0 && < 0.12
    , Cabal       ^>= 3.4.1.0
    , containers   >= 0.5.0.0  && < 0.7
    , mtl          >= 2.2.2    && < 2.4
    , pretty      ^>= 1.1.2

  exposed-modules:
    Distribution.Server.Util.CabalRevisions

test-suite cabal-revisions-tests
  default-language:    Haskell2010
  hs-source-dirs:      tests
  ghc-options:         -Wall -Wcompat
  type:                exitcode-stdio-1.0
  main-is:             Tests.hs
  build-depends:
    , base
    , bytestring
    , Cabal
    , cabal-revisions
    , tasty         >= 1.0      && < 1.5
        -- tasty-1.0 for stack-8.2.2.yaml
    , tasty-golden ^>= 2.3.2
    , filepath     ^>= 1.4.0.0

executable hackage-cli
  default-language:    Haskell2010
  other-extensions:
    CPP
    LambdaCase
    OverloadedStrings
    RecordWildCards
    TemplateHaskell

  hs-source-dirs:      src
  main-is:             Main.hs

  other-modules:
    IndexShaSum
    CabalEdit
    Paths_hackage_cli

  autogen-modules:
    Paths_hackage_cli

  build-depends:
    , base
    , bytestring
    , Cabal
    , cabal-revisions
    , containers
    , mtl

  build-depends:
    , aeson                  >= 1.2.4.0 && < 2.1
        -- aeson-1.2.4.0 for stack-8.2.2.yaml
    , deepseq               ^>= 1.4.0.0
    , directory             ^>= 1.2.0.1 || ^>= 1.3.0.0
    , filepath              ^>= 1.4.0.0
    , http-io-streams       ^>= 0.1.0.0
    , io-streams            ^>= 1.5.0.1
    , microlens              >= 0.4.8.3  && < 4.13
    , microlens-mtl          >= 0.1.11.1 && < 0.3
    , microlens-th           >= 0.4.1.3  && < 0.5
    , netrc                 ^>= 0.2.0.0
    , optparse-applicative   >= 0.14    && < 0.18
    , process-extras        ^>= 0.7.4
    , semigroups             >= 0.18.3  && < 0.21
    , stringsearch          ^>= 0.3.6
    , tagsoup               ^>= 0.14
    , tar                   ^>= 0.5
    , text                   >= 1.2     && < 2.1
    , time                   >= 1.5.0.1 && < 1.13
    , unordered-containers  ^>= 0.2.7
    , zlib                  ^>= 0.6.1

  ghc-options: -Wall -Wcompat -threaded