cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Cabal should respect PKG_CONFIG

Open wenkokke opened this issue 2 years ago • 4 comments

Describe the bug Cabal should probably respect the PKG_CONFIG environment variable, rather than hard-coding the name "pkg-config", as done in, e.g., Distribution.Simple.Program.Builtin. For instance, mingw packages are moving to use pkgconf, which leads to trouble with Cabal, as pkg-config and pkgconf cannot both be installed.

wenkokke avatar Oct 11 '22 14:10 wenkokke

If memory serves me, PKG_CONFIG env var is used by other package managers, besides Cabal. Thus, relying on it here could be problematic.

mouse07410 avatar Oct 11 '22 23:10 mouse07410

Is that env var documented as a standard anywhere or is it just widespread convention?

gbaz avatar Oct 12 '22 00:10 gbaz

I can't recall. Sorry!

mouse07410 avatar Oct 12 '22 01:10 mouse07410

FreeBSD also uses pkgconf but we also install the pkg-config symlink pointing to pkgconf. Maybe MinGW should do the same?

If an utility is intended to be a drop-in replacement and not intended to be coinstalled, I'd rather fix it on the packaging side.

arrowd avatar Oct 12 '22 09:10 arrowd