diff --git a/pkgs/build-support/pkg-config-wrapper/default.nix b/pkgs/build-support/pkg-config-wrapper/default.nix index 3e5785d23988..f1bc5da5481d 100644 --- a/pkgs/build-support/pkg-config-wrapper/default.nix +++ b/pkgs/build-support/pkg-config-wrapper/default.nix @@ -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 diff --git a/pkgs/build-support/pkg-config-wrapper/setup-hook.sh b/pkgs/build-support/pkg-config-wrapper/setup-hook.sh index 12b9af5e5837..34f1a999a82e 100644 --- a/pkgs/build-support/pkg-config-wrapper/setup-hook.sh +++ b/pkgs/build-support/pkg-config-wrapper/setup-hook.sh @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 680177a2610a..228af7e55a53 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {