-
Notifications
You must be signed in to change notification settings - Fork 368
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
Support ~/.config/opam (per XDG base dir spec) #3766
Comments
Just to get this started, you can |
Just added an entry for opam in https://wiki.archlinux.org/title/XDG_Base_Directory.
Could you please let me know if there is any aditional configuration required to make |
opam will pick up everything required from However, this puts an entire root (binaries, etc.) into a |
opam should continue to check I think layout should work:
opam doesn't need to put anything under Note that the Most of this just involves a certain amount of mangling in |
Yes, I am concerned about that too. As a (hopefully temporary) comprise, I'll add instructions in the Arch wiki to configure |
@dra27 Is this coming in Opam 2.2? All Diskuv Windows patches have been incorporated into the Opam trunk (thanks!) except this change per the discussion in #4815 which fixes the Windows path only: let default = {
root_dir = OpamFilename.(
if Sys.win32 then
(* CSIDL_LOCAL_APPDATA = 0x1c *)
concat_and_resolve (Dir.of_string (OpamStubs.(shGetFolderPath 0x1c SHGFP_TYPE_CURRENT))) "opam"
else
concat_and_resolve (Dir.of_string (OpamStd.Sys.home ())) ".opam"
); |
XDG itself is definitely bumped from 2.2 - partly because it's not been done but also because it would involve a root version bump, which isn't otherwise needed in this release (so we'd break compatibility with tools using the old libraries for no other reason than switching to XDG). However, the Windows default location for the root is separate from that - see #5212 which should be entirely Diskuv-ready! |
There is a de facto standard that aims to give an alternative to every program creating its own hidden dir directly under the home dir: the XDG base dir spec.
Would it be possible to do one of the following?
$XDG_CONFIG_HOME
, falling back to~/.config/opam
(then optionally falling back to~/.opam
for legacy compat)~/.config/opam
(optionally falling back to~/.opam
for legacy compat)opam
directory location using an env var.Many programs allow one of these, as documented at https://wiki.archlinux.org/index.php/XDG_Base_Directory
I want my home directory as uncluttered as possible, and any of these would help with that goal – although the most standard approach would be nicest.
The text was updated successfully, but these errors were encountered: