cabal-add: Extend Cabal build-depends from the command line

[ bsd3, development, library, program ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Automatic Flags
NameDescriptionDefault
cabal-syntaxDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1
Change log CHANGELOG.md
Dependencies base (<5), bytestring (<0.13), Cabal (>=3.6 && <3.7 || >=3.8 && <3.15), cabal-add, cabal-install-parsers (>=0.4.1 && <0.7), Cabal-syntax (<3.7 || >=3.8 && <3.15), containers (<0.8), directory (<1.4), filepath (<1.6), mtl (<2.4), optparse-applicative (>=0.16 && <0.19), process (<1.7) [details]
Tested with ghc ==9.10.1, ghc ==9.8.2, ghc ==9.6.6, ghc ==9.4.8, ghc ==9.2.8
License BSD-3-Clause
Author Bodigrim
Maintainer andrew.lelechenko@gmail.com
Revised Revision 1 made by Bodigrim at 2024-09-19T18:34:24Z
Category Development
Source repo head: git clone https://github.com/Bodigrim/cabal-add.git
Uploaded by Bodigrim at 2024-08-20T21:35:22Z
Distributions LTSHaskell:0.1
Executables cabal-add
Downloads 227 total (50 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for cabal-add-0.1

[back to package description]

cabal-add Hackage Stackage LTS Stackage Nightly

Extend Cabal build-depends from the command line.

cabal-add does not have limitations of cabal-edit: it works on any sectioned Cabal file, supports stanzas and conditional blocks, and preserves original formatting.

Install the executable with

cabal install cabal-add

To add a dependency on foo, switch to a folder with your project and execute

cabal-add foo

If you are using Cabal 3.12+ which supports external commands, you can omit the dash:

cabal add foo

Command-line arguments:

  • --project-file FILE

    Set the path of the cabal.project file. Detect cabal.project or *.cabal in the current folder, if omitted.

  • ARGS

    Optional target (wildcards such as exe, test or bench are supported) to update, followed by a non-empty list of package(s) to add to build-depends section. Version bounds can be provided as well, use quotes to escape comparisons from your shell. E. g., 'foo < 0.2'.