mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
pkg-config: set prefixed mainProgram for cross compilation
`lib.getExe pkgsCross.riscv64.buildPackages.pkg-config` should return `<prefix>/bin/riscv64-unknown-linux-gnu-pkg-config` not `<prefix>/bin/pkg-config`
This commit is contained in:
parent
f088beac19
commit
2f46085c19
@ -34,6 +34,7 @@ let
|
||||
# See description in cc-wrapper.
|
||||
suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config;
|
||||
|
||||
wrapperBinName = "${targetPrefix}${baseBinName}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@ -73,7 +74,7 @@ stdenv.mkDerivation {
|
||||
|
||||
echo $pkg-config > $out/nix-support/orig-pkg-config
|
||||
|
||||
wrap ${targetPrefix}${baseBinName} ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/${baseBinName}"
|
||||
wrap ${wrapperBinName} ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/${baseBinName}"
|
||||
''
|
||||
# symlink in share for autoconf to find macros
|
||||
|
||||
@ -128,10 +129,11 @@ stdenv.mkDerivation {
|
||||
|
||||
meta =
|
||||
let pkg-config_ = optionalAttrs (pkg-config != null) pkg-config; in
|
||||
(optionalAttrs (pkg-config_ ? meta) (removeAttrs pkg-config.meta ["priority"])) //
|
||||
(optionalAttrs (pkg-config_ ? meta) (removeAttrs pkg-config.meta ["priority" "mainProgram"])) //
|
||||
{ description =
|
||||
attrByPath ["meta" "description"] "pkg-config" pkg-config_
|
||||
+ " (wrapper script)";
|
||||
priority = 10;
|
||||
mainProgram = wrapperBinName;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user