Open jfdm opened 8 years ago
I think XDG dirs also provides a global option?
On Aug 10, 2016 8:54 AM, "Jan de Muijnck-Hughes" notifications@github.com wrote:
I installed Idris v0.12.2 using the official pkg installer on Mac OS X. Although idris is installed in /usr/local/bin. The result of running idris --libdir is:
/usr/local/share/x86_64-osx-ghc-7.10.3/idris-0.12.2/
Ideally the location should one of:
/usr/local/share/idris/
or
/usr/local/share/idris-0.12.2/
or
/usr/local/share/idris/0.12.2/
If Issue #3334 https://github.com/idris-lang/Idris-dev/issues/3334 is addressed then this issue too would be addressed albeit from a user's perspective.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/idris-lang/Idris-dev/issues/3355, or mute the thread https://github.com/notifications/unsubscribe-auth/AABwJ_iWrr_kmv6XslkBCPMawa9NdwXUks5qefQ0gaJpZM4JhS8A .
I do not know if XDG variables are respected on Mac OS X in the first place. Documentation on directory
is not conclusive.
Ah looks like this is straightforward, we need to configure datasubdir
for cabal as well as the prefix. So instead of:
cabal configure --prefix=/usr/local
we have instead
cabal configure --prefix=/usr/local --datasubdir='$pkgid'
I haven't tested it with pkgbuild
yet., so will wait until I have done so before making a PR.
Nice find! I'm on a Mac w/ pkgbuild
today, so I could test that out if you want.
If you want, that would be helpful. I just mothballed my mac and don't have the means to build Idris Idris from source on it anymore.
But will need to double check the default installation dirs for cabal for any other surprises.
On ghc 7.10.3, OSX 10.11.6, this all seems to work fine. Added a --datasubdir=idris-13.0
to the cabal configure
line in mkpkg.sh
, ran that script, and installed the produced idris.pkg.
I now have a /usr/local/bin/idris
which reports a libdir
of /usr/local/share/idris-13.0/
. In there is the usual contents of libs/
:
base/ contrib/ effects/ idrisdoc/ jsrts/ prelude/ pruviloj/ rts/
The Arch Linux Idris package leverages this same Cabal flag, too: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/idris#n29
I installed Idris v0.12.2 using the official pkg installer on Mac OS X. Although idris is installed in
/usr/local/bin
. The result of runningidris --libdir
is:Ideally the location should one of:
or
or
If Issue #3334 is addressed then this issue too would be addressed albeit from a user's perspective.