haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.63k stars 697 forks source link

Conditional data-files #10555

Open augustss opened 3 days ago

augustss commented 3 days ago

What is your question? I need to install different data-files depending on a condition (in my case which compiler it is). I tried using an if, but that doesn't seem to work.

Is there no way to do this? Or am I just being stupid?

System information cabal-install version 3.12.1.0 compiled using version 3.12.1.0 of the Cabal library

philderbeast commented 3 days ago

I haven't tested this but from the docs it looks like conditionals are not available for data-files:

Conditional blocks may appear anywhere inside a component or common section. SOURCE: Conditional Blocks.

# https://github.com/haskell/cabal/pull/9153/files
- Conditional blocks may appear anywhere inside a library or executable
+ Conditional blocks may appear anywhere inside a component or common