[Haskell-cafe] Why can't I seem to use environment variables in my cabal file?

Mikolaj Konarski mikolaj at well-typed.com
Sat Jun 26 18:04:52 UTC 2021

Hi David,

> I’m trying to make use of an environment variable in my cabal file: ${ENV_VAR}, but I don’t think its value is getting used correctly. Is this a known issue? Workaround?

I'd guess this was never implemented. A workaround would be running
your cabal files through a preprocessor, as part of your workflow.

I think the current effort to design and implement exact-print for
cabal files and the implied overhaul of cabal files AST and handling
will make this feature easier to implement:

There is also a not entirely unrelated effort to affect cabal
behaviour via hooks: https://github.com/haskell/cabal/issues/7394

Contributions are very welcome.

Best regards,

More information about the Haskell-Cafe mailing list