haskell / haskell/cabal

Discover ghc-pkg from $LibDir/bin/ghc-pkg

Open
#6,648 6 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.