Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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`

Nick Cao 2f46085c f088beac

+4 -2
+4 -2
pkgs/build-support/pkg-config-wrapper/default.nix
··· 34 # See description in cc-wrapper. 35 suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; 36 37 in 38 39 stdenv.mkDerivation { ··· 73 74 echo $pkg-config > $out/nix-support/orig-pkg-config 75 76 - wrap ${targetPrefix}${baseBinName} ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/${baseBinName}" 77 '' 78 # symlink in share for autoconf to find macros 79 ··· 128 129 meta = 130 let pkg-config_ = optionalAttrs (pkg-config != null) pkg-config; in 131 - (optionalAttrs (pkg-config_ ? meta) (removeAttrs pkg-config.meta ["priority"])) // 132 { description = 133 attrByPath ["meta" "description"] "pkg-config" pkg-config_ 134 + " (wrapper script)"; 135 priority = 10; 136 }; 137 }
··· 34 # See description in cc-wrapper. 35 suffixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; 36 37 + wrapperBinName = "${targetPrefix}${baseBinName}"; 38 in 39 40 stdenv.mkDerivation { ··· 74 75 echo $pkg-config > $out/nix-support/orig-pkg-config 76 77 + wrap ${wrapperBinName} ${./pkg-config-wrapper.sh} "${getBin pkg-config}/bin/${baseBinName}" 78 '' 79 # symlink in share for autoconf to find macros 80 ··· 129 130 meta = 131 let pkg-config_ = optionalAttrs (pkg-config != null) pkg-config; in 132 + (optionalAttrs (pkg-config_ ? meta) (removeAttrs pkg-config.meta ["priority" "mainProgram"])) // 133 { description = 134 attrByPath ["meta" "description"] "pkg-config" pkg-config_ 135 + " (wrapper script)"; 136 priority = 10; 137 + mainProgram = wrapperBinName; 138 }; 139 }