@hackage cabal-add0.2
Extend Cabal build-depends from the command line
Categories
License
BSD-3-Clause
Maintainer
andrew.lelechenko@gmail.com
Links
Versions
Installation
Tested Compilers
Dependencies (6)
- Cabal >=3.8 && <3.17
- Cabal-syntax >=3.8 && <3.17
- base <5
- bytestring <0.13
- containers <0.9
- mtl <2.4 Show all…
Dependents (1)
@hackage/haskell-language-server
cabal-add

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 FILESet the path of the cabal.project file. Detect
cabal.projector*.cabalin the current folder, if omitted. -
ARGSOptional target (wildcards such as
exe,testorbenchare supported) to update, followed by a non-empty list of package(s) to add tobuild-dependssection. Version bounds can be provided as well, use quotes to escape comparisons from your shell. E. g.,'foo < 0.2'.