Why can't I seem to use environment variables in my cabal file?

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?

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: https://github.com/haskell/cabal/projects/9 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, Mikolaj
participants (2)
-
David Banas
-
Mikolaj Konarski