Discover ghc-pkg from $LibDir/bin/ghc-pkg
Open
type: enhancement
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
```
% ghc --info|grep LibDir
,("LibDir","/opt/ghc/8.6.5/lib/ghc-8.6.5")
```
```
% ls /opt/ghc/8.6.5/lib/ghc-8.6.5/bin/ghc-pkg
/opt/ghc/8.6.5/lib/ghc-8.6.5/bin/ghc-pkg
```
I think this better than whatever path guessing we do now, and should be tried first for GHC.
cc @hvr
EDIT: looks like the `bin` might be missing for older GHCs, and the executables are directly in lib
```
/opt/ghc/7.0.4/lib/ghc-7.0.4/ghc-pkg
...
/opt/ghc/7.6.3/lib/ghc-7.6.3/ghc-pkg
/opt/ghc/7.8.4/lib/ghc-7.8.4/bin/ghc-pkg
...
/opt/ghc/8.10.1/lib/ghc-8.10.1/bin/ghc-pkg
```
Contributor guide
Assessment
This issue has not been assessed yet.