Merge pull request #233815 from reckenrode/bindgenHook-fix
rustPlatform.bindgenHook: use the correct Libsystem on the 11.0 SDK
This commit is contained in:
commit
db38340b4d
|
@ -50,16 +50,18 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mkStdenv = stdenv:
|
mkCc = cc:
|
||||||
let
|
if stdenv.isAarch64 then cc
|
||||||
cc = stdenv.cc.override {
|
else
|
||||||
|
cc.override {
|
||||||
bintools = stdenv.cc.bintools.override { libc = packages.Libsystem; };
|
bintools = stdenv.cc.bintools.override { libc = packages.Libsystem; };
|
||||||
libc = packages.Libsystem;
|
libc = packages.Libsystem;
|
||||||
};
|
};
|
||||||
in
|
|
||||||
|
mkStdenv = stdenv:
|
||||||
if stdenv.isAarch64 then stdenv
|
if stdenv.isAarch64 then stdenv
|
||||||
else
|
else
|
||||||
(overrideCC stdenv cc).override {
|
(overrideCC stdenv (mkCc stdenv.cc)).override {
|
||||||
targetPlatform = stdenv.targetPlatform // {
|
targetPlatform = stdenv.targetPlatform // {
|
||||||
darwinMinVersion = "10.12";
|
darwinMinVersion = "10.12";
|
||||||
darwinSdkVersion = "11.0";
|
darwinSdkVersion = "11.0";
|
||||||
|
@ -104,6 +106,12 @@ let
|
||||||
rustPlatform = pkgs.makeRustPlatform {
|
rustPlatform = pkgs.makeRustPlatform {
|
||||||
inherit (pkgs.darwin.apple_sdk_11_0) stdenv;
|
inherit (pkgs.darwin.apple_sdk_11_0) stdenv;
|
||||||
inherit (pkgs) rustc cargo;
|
inherit (pkgs) rustc cargo;
|
||||||
|
} // {
|
||||||
|
inherit (pkgs.callPackage ../../../build-support/rust/hooks {
|
||||||
|
inherit (pkgs.darwin.apple_sdk_11_0) stdenv;
|
||||||
|
inherit (pkgs) cargo rustc;
|
||||||
|
clang = mkCc pkgs.clang;
|
||||||
|
}) bindgenHook;
|
||||||
};
|
};
|
||||||
|
|
||||||
callPackage = newScope (lib.optionalAttrs stdenv.isDarwin (stdenvs // rec {
|
callPackage = newScope (lib.optionalAttrs stdenv.isDarwin (stdenvs // rec {
|
||||||
|
|
Loading…
Reference in a new issue