pkgconf: Wrap with pkg-config-wrapper

This commit is contained in:
John Ericson 2020-05-21 11:13:27 -04:00
parent 23490e3f50
commit 95080ea90b
3 changed files with 9 additions and 4 deletions

View file

@ -4,6 +4,7 @@
{ stdenvNoCC
, buildPackages
, pkg-config
, baseBinName ? "pkg-config"
, propagateDoc ? pkg-config != null && pkg-config ? man
, extraPackages ? [], extraBuildCommands ? ""
}:
@ -34,7 +35,7 @@ stdenv.mkDerivation {
shell = getBin stdenvNoCC.shell + stdenvNoCC.shell.shellPath or "";
inherit targetPrefix suffixSalt;
inherit targetPrefix suffixSalt baseBinName;
outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (pkg-config ? doc) "doc");
@ -63,7 +64,7 @@ stdenv.mkDerivation {
echo $pkg-config > $out/nix-support/orig-pkg-config
wrap ${targetPrefix}pkg-config ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/pkg-config"
wrap ${targetPrefix}${baseBinName} ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/${baseBinName}"
''
# symlink in share for autoconf to find macros

View file

@ -23,7 +23,7 @@ getTargetRoleWrapper
addEnvHooks "$targetOffset" pkgConfigWrapper_addPkgConfigPath
export PKG_CONFIG${role_post}=@targetPrefix@pkg-config
export PKG_CONFIG${role_post}=@targetPrefix@@baseBinName@
# No local scope in sourced file
unset -v role_post

View file

@ -10739,7 +10739,11 @@ in
pmccabe = callPackage ../development/tools/misc/pmccabe { };
pkgconf = callPackage ../development/tools/misc/pkgconf {};
pkgconf-unwrapped = callPackage ../development/tools/misc/pkgconf {};
pkgconf = callPackage ../build-support/pkg-config-wrapper {
pkg-config = pkgconf-unwrapped;
baseBinName = "pkgconf";
};
pkg-config-unwrapped = callPackage ../development/tools/misc/pkg-config { };
pkg-config = callPackage ../build-support/pkg-config-wrapper {