mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-13 16:12:40 +02:00
feat(templates/bevy): update nixpkgs to use the latest darwin_sdk
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
])
|
])
|
||||||
# use rust-analyzer-nightly for better type inference
|
# use rust-analyzer-nightly for better type inference
|
||||||
rust-analyzer-nightly
|
rust-analyzer-nightly
|
||||||
|
cargo-watch
|
||||||
]
|
]
|
||||||
# https://github.com/bevyengine/bevy/blob/v0.14.2/docs/linux_dependencies.md#nix
|
# https://github.com/bevyengine/bevy/blob/v0.14.2/docs/linux_dependencies.md#nix
|
||||||
++ (lib.optionals pkgs.stdenv.isLinux [
|
++ (lib.optionals pkgs.stdenv.isLinux [
|
||||||
@@ -66,40 +67,9 @@
|
|||||||
# https://discourse.nixos.org/t/develop-shell-environment-setup-for-macos/11399
|
# https://discourse.nixos.org/t/develop-shell-environment-setup-for-macos/11399
|
||||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/os-specific/darwin/apple-sdk/frameworks.nix
|
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable-small/pkgs/os-specific/darwin/apple-sdk/frameworks.nix
|
||||||
++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [
|
++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [
|
||||||
# Additional darwin specific inputs can be set here
|
apple-sdk_15
|
||||||
libiconv
|
|
||||||
darwin.apple_sdk.frameworks.Security
|
|
||||||
darwin.apple_sdk.frameworks.ApplicationServices
|
|
||||||
darwin.apple_sdk.frameworks.CoreVideo
|
|
||||||
darwin.apple_sdk.frameworks.Carbon
|
|
||||||
darwin.apple_sdk.frameworks.AppKit
|
|
||||||
]);
|
]);
|
||||||
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
|
||||||
COREAUDIO_SDK_PATH =
|
|
||||||
pkgs.lib.optionals
|
|
||||||
pkgs.stdenv.isDarwin
|
|
||||||
# The coreaudio-sys crate is configured to look for things in whatever the
|
|
||||||
# output of `xcrun --sdk macosx --show-sdk-path` is. However, this does not
|
|
||||||
# always contain the right frameworks, and it uses system versions instead of
|
|
||||||
# what we control via Nix. Instead of having to run a lot of extra scripts
|
|
||||||
# to set our systems up to build, we can just create a SDK directory with
|
|
||||||
# the same layout as the `MacOSX{version}.sdk` that XCode produces.
|
|
||||||
(pkgs.symlinkJoin {
|
|
||||||
name = "sdk";
|
|
||||||
paths = with pkgs.darwin.apple_sdk.frameworks; [
|
|
||||||
AudioToolbox
|
|
||||||
AudioUnit
|
|
||||||
CoreAudio
|
|
||||||
CoreAudioTypes
|
|
||||||
CoreFoundation
|
|
||||||
CoreMIDI
|
|
||||||
OpenAL
|
|
||||||
];
|
|
||||||
postBuild = ''
|
|
||||||
mkdir $out/System
|
|
||||||
mv $out/Library $out/System
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user