1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

darwin.apple_sdk_11_0: add mkCc

This commit is contained in:
Weijia Wang 2023-05-24 16:49:40 +03:00
parent 2c070763c7
commit 3d29de1f5b

View file

@ -50,16 +50,18 @@ let
'';
};
mkStdenv = stdenv:
let
cc = stdenv.cc.override {
mkCc = cc:
if stdenv.isAarch64 then cc
else
cc.override {
bintools = stdenv.cc.bintools.override { libc = packages.Libsystem; };
libc = packages.Libsystem;
};
in
mkStdenv = stdenv:
if stdenv.isAarch64 then stdenv
else
(overrideCC stdenv cc).override {
(overrideCC stdenv (mkCc stdenv.cc)).override {
targetPlatform = stdenv.targetPlatform // {
darwinMinVersion = "10.12";
darwinSdkVersion = "11.0";
@ -108,10 +110,7 @@ let
inherit (pkgs.callPackage ../../../build-support/rust/hooks {
inherit (pkgs.darwin.apple_sdk_11_0) stdenv;
inherit (pkgs) cargo rustc;
clang = pkgs.clang.override {
bintools = pkgs.clang.bintools.override { libc = packages.Libsystem; };
libc = packages.Libsystem;
};
clang = mkCc pkgs.clang;
}) bindgenHook;
};