https://github.com/bodigrim/cabal-add
Extend Cabal build-depends from the command line
https://github.com/bodigrim/cabal-add
cabal cabal-install dependencies dependency
Last synced: about 1 year ago
JSON representation
Extend Cabal build-depends from the command line
- Host: GitHub
- URL: https://github.com/bodigrim/cabal-add
- Owner: Bodigrim
- License: bsd-3-clause
- Created: 2023-10-15T22:45:37.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T16:48:53.000Z (over 1 year ago)
- Last Synced: 2025-03-16T06:32:11.267Z (about 1 year ago)
- Topics: cabal, cabal-install, dependencies, dependency
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/cabal-add
- Size: 35.2 KB
- Stars: 56
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cabal-add [](https://hackage.haskell.org/package/cabal-add) [](http://stackage.org/lts/package/cabal-add) [](http://stackage.org/nightly/package/cabal-add)
Extend Cabal `build-depends` from the command line.
`cabal-add` does not have limitations of
[`cabal-edit`](https://hackage.haskell.org/package/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](https://cabal.readthedocs.io/en/3.12/external-commands.html),
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](https://cabal.readthedocs.io/en/latest/cabal-commands.html#target-forms)
(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'`.