packages feed

cabal-add-0.1: cabal-add.cabal

cabal-version:   3.0
name:            cabal-add
version:         0.1
license:         BSD-3-Clause
license-file:    LICENSE
maintainer:      andrew.lelechenko@gmail.com
author:          Bodigrim
tested-with:
    ghc ==9.10.1 ghc ==9.8.2 ghc ==9.6.6 ghc ==9.4.8 ghc ==9.2.8

synopsis:        Extend Cabal build-depends from the command line
description:
    Extend Cabal @build-depends@ from the command line.
    It works on any sectioned Cabal file,
    supports stanzas and conditional blocks,
    and preserves original formatting.

category:        Development
build-type:      Simple
extra-doc-files:
    README.md
    CHANGELOG.md

source-repository head
    type:     git
    location: https://github.com/Bodigrim/cabal-add.git

flag cabal-syntax
    default: False

library
    exposed-modules:  Distribution.Client.Add
    hs-source-dirs:   src
    default-language: GHC2021
    ghc-options:      -Wall
    build-depends:
        base <5,
        bytestring <0.13,
        Cabal >=3.6 && <3.13,
        containers <0.8,
        mtl <2.4

    if flag(cabal-syntax)
        build-depends:
            Cabal-syntax >=3.8 && <3.13,
            Cabal >=3.8

    else
        build-depends:
            Cabal-syntax <3.7,
            Cabal <3.7

executable cabal-add
    main-is:          Main.hs
    hs-source-dirs:   app
    default-language: GHC2021
    ghc-options:      -Wall
    build-depends:
        base <5,
        bytestring <0.13,
        cabal-add,
        cabal-install-parsers >=0.4.1 && <0.7,
        directory <1.4,
        filepath <1.6,
        optparse-applicative >=0.16 && <0.19,
        process <1.7

    if flag(cabal-syntax)
        build-depends: Cabal-syntax

    else
        build-depends: Cabal

test-suite cabal-add-tests
    type:               exitcode-stdio-1.0
    main-is:            Main.hs
    build-tool-depends: cabal-add:cabal-add
    hs-source-dirs:     tests
    default-language:   GHC2021
    ghc-options:        -Wall
    build-depends:
        base <5,
        Diff >=0.4,
        directory,
        process,
        string-qq,
        tasty,
        temporary