Replies: 6 comments 18 replies
-
You might be able to get away with not setting |
Beta Was this translation helpful? Give feedback.
-
After trying to update nixpkgs flake, I'm getting occur errors in m2! Now it doesn't recognize the MacOSX-SDK that used to work fine on my M2. I wonder what's going on all of a sudden. Haha. -_- Onz. https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-sdk/default.nix I feel like it would be a hassle to match the frameworks and versions in the current nixpkgs and constantly monitor them, so I'm just going to wait until nixpkgs provides a simple solution. |
Beta Was this translation helpful? Give feedback.
-
There haven't been any changes to nixpkgs darwin. It was my misunderstanding. The reason was that there were internal updates happening on my Mac, and when I installed the command-line tools again, it started working on my M2. Even referring to the link you provided for intel-mac, which includes darwin.apple-sdk.sdk, darwin.apple-sdk_11.sdk, and darwin.apple-sdk_11.MacOSX-SDK (the three default Intel-based options provided by nixpkgs), they all fail as well. It's a bit disheartening. Perhaps nixpkgs has given up on supporting Intel Macs since the release of M1? After all, Apple is a closed-source company. Haha, I hope it will work someday. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/reckenrode/nixpkgs/blob/master/doc/stdenv/platform-notes.chapter.md |
Beta Was this translation helpful? Give feedback.
-
I was able to reproduce the issue installing The key was adding |
Beta Was this translation helpful? Give feedback.
-
thanks for the hint @reckenrode, adding libsystem to
{ rustPlatform, cmake, darwin }:
let
inherit (darwin.apple_sdk_11_0.frameworks)
AudioUnit
CoreAudioKit
OpenAL
;
in
rustPlatform.buildRustPackage {
pname = "editor";
version = "0.1.0";
srcs = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [
cmake
rustPlatform.bindgenHook
];
buildInputs = [
AudioUnit
CoreAudioKit
OpenAL
darwin.apple_sdk_11_0.Libsystem
];
cargoBuildFlags = [ "-p" "editor" ];
cargoTestFlags = [ "-p" "editor" ];
}
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
inherit (nixpkgs.lib)
genAttrs
;
eachSystem = f: genAttrs
[
"aarch64-darwin"
"x86_64-darwin"
]
(system: f nixpkgs.legacyPackages.${system});
in
{
packages = eachSystem (pkgs: {
default = pkgs.darwin.apple_sdk_11_0.callPackage self { };
});
};
} |
Beta Was this translation helpful? Give feedback.
-
Hello
help me~
I'm building the basic template of the Fyrox game engine.
As the title suggests, while the build is successful on ARM Mac, it's not the case for Intel Mac. The code is ready to use with hidden buildInputs, but they are just the ones under the frameworks and a few like stdenv.cc.cc.lib, libiconv, lld, clang, and llvm. On Linux, it requires things like fontconfig and alsa-lib. The important thing here is the Mac build, and the Mac build requires COREAUDIO_SDK_PATH. It seems like darwin.apple_sdk.MacOSX-SDK is exclusively for ARM M1 and M2. Do you happen to know what the macOS SDK for Intel is? I want to successfully complete the build.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions