Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change datadir #61

Closed
langston-barrett opened this issue Jul 8, 2018 · 5 comments
Closed

Change datadir #61

langston-barrett opened this issue Jul 8, 2018 · 5 comments

Comments

@langston-barrett
Copy link
Collaborator

Is there a way to change the datadir? I'm building Herms with Nix, and the datadir is a path in the Nix store:

/nix/store/n8ql2a3x0j0ciq05lnsn3pvlm5m8f7sa-herms-1.9.0.1-data/share/ghc-8.2.2/x86_64-linux-ghc-8.2.2/herms-1.9.0.1/

which is read-only. Can I change this setting with a command line flag or environment variable?

If not, consider this a feature request, one that I'd be willing to implement (pointers appreciated!).

@langston-barrett
Copy link
Collaborator Author

It seems like getDataDir is some cabal magic set at compile-time and that it is used before options are parsed, so it will take a bit of fiddling to be able to set it using a command-line option. An environment variable might be a good stopgap.

@LuxMiranda
Copy link
Owner

This is a great idea! I played around with this a bit when first implementing datadir, (I think it'd be great to just have a ~/.herms directory), but I also realized that there's some shadowy arcane machinations behind the scenes that make it a little more difficult than anticipated. I'll add it to the requested feature list!

@langston-barrett
Copy link
Collaborator Author

@JackKiefer Thanks. I plan to implement an environment variable soon.

@langston-barrett
Copy link
Collaborator Author

Another way forward (with other benefits) would be XDG compliance. We already import directory, which provides getXdgDirectory. This would obviate ad-hoc environment variable parsing overriding defaults, etc. since the user can just change their XDG_* variables.

@langston-barrett
Copy link
Collaborator Author

Closed in #65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants