mirror of
https://github.com/roc-lang/roc.git
synced 2024-08-17 06:41:22 +03:00
add the right COREAUDIO_SDK_PATH fore coreaudio-sys
This commit is contained in:
parent
2980e195ce
commit
5ef5a364ba
29
shell.nix
29
shell.nix
@ -77,4 +77,33 @@ in pkgs.mkShell {
|
||||
LD_LIBRARY_PATH = with pkgs;
|
||||
lib.makeLibraryPath
|
||||
([ pkg-config stdenv.cc.cc.lib libffi ncurses zlib ] ++ linuxInputs);
|
||||
|
||||
COREAUDIO_SDK_PATH = if pkgs.stdenv.isDarwin then
|
||||
# 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
|
||||
CoreFoundation
|
||||
CoreMIDI
|
||||
OpenAL
|
||||
];
|
||||
postBuild = ''
|
||||
mkdir $out/System
|
||||
mv $out/Library $out/System
|
||||
'';
|
||||
}
|
||||
else
|
||||
# TODO: I'm not 100% confident that this being blank won't cause issues for
|
||||
# Nix-on-Linux development. It may be sufficient to use the pkgs.symlinkJoin
|
||||
# above regardless of system! That'd set us up for cross-compilation as well.
|
||||
"";
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user