How to get Julia home in Julia 0.7?

How can I get Julia home directory in 0.7? In 0.6 we could ccall jl_get_julia_home, but it seems to be missing from the latest master.

Context: I’m trying to help in migrating Sugar.jl which uses jl_get_julia_home to discover Base sources and extract code from there.

Perhaps joinpath(homedir(),".julia") ?

Apparently the runtime function is now jl_get_julia_bindir(), but perhaps it’s better to use Sys.BINDIR.

joinpath(homedir(),".julia") returns package path, not path to Julia installation where Base files are. Sys.BINDIR does the trick, thanks!

That’s the default package path, which doesn’t take the JULIA_PKGDIR environment variable into account. Pkg.Dir._pkgroot() should be used on master for the package path. Just to avoid confusion.