How to not use explicit directories in cabal config

I am trying to create a cabal config file that does not use the explicit absolute path (“/home/…”) and instead something more portable like “~” or “$HOME”. However, it seems like that cabal does not recognise these as the home directory, but rather just relative paths (creating directories in the current working directory called “~” or “$HOME”.

So my question is whether there is a way to specify the home directory like I tried to. Or is this not possible with cabal’s config?

here is the relevant documentation. so just set your environment variables and if necessary delete the .cabal dir. if that is not the solution please rephrase your question with more details

2 Likes