haskell / haskell/cabal

Add support for setting custom project file in cabal script-metadata

Open
#6,353 0 comments 3 reactions 0 assignees View on GitHub
cabal-install: cmd/run re: project-file re: scripts type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Hi, in `haskell-ide-engine` there exist [an script to build the project using shake](https://github.com/haskell/haskell-ide-engine/blob/master/install.hs). Actually the script has to be ran with cabal this way:
```
cabal v2-run install.hs --project-file install/shake.project
```
I think @power-fungus mentioned that maybe the cabal script feature could be improved adding the option to set a custom project file in the script metadata and be able to run it simply with:
```
cabal v2-run install.hs
```
adding in the script somewhat like:
```
{- cabal:
build-depends:
base
, hie-install
project-file: install/shake.project
-}
```

I've not found any issue about, sorry if it already exists.

This one is related with #5698 cause you could set all available `cabal.project`-fields in the custom project file.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.