all: add support for macOS to flake.nix

The Nix version of the macOS toolchain has difficulties compiling
Objective-C modules; disable modules instead of figuring out why.
It also doesn't include any frameworks automatically; add them explicitly.

While here, move suppression of OpenGL deprecation to a GL-specific
file.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-08-01 01:33:21 +02:00
parent f7bc744a24
commit 5326ca5fbe
12 changed files with 51 additions and 69 deletions
+3 -3
View File
@@ -10,10 +10,10 @@ import (
)
/*
#cgo CFLAGS: -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
#cgo LDFLAGS: -framework CoreGraphics
#cgo CFLAGS: -Werror -Wno-deprecated-declarations -fobjc-arc -x objective-c
#cgo LDFLAGS: -framework CoreGraphics -framework Metal -framework Foundation
@import Metal;
#import <Metal/Metal.h>
static CFTypeRef createDevice(void) {
@autoreleasepool {
+2 -4
View File
@@ -13,10 +13,8 @@ import (
)
/*
#cgo CFLAGS: -Werror -xobjective-c -fmodules -fobjc-arc
#cgo LDFLAGS: -framework CoreGraphics
@import Metal;
#cgo CFLAGS: -Werror -xobjective-c -fobjc-arc
#cgo LDFLAGS: -framework CoreGraphics -framework Metal -framework Foundation
#include <CoreFoundation/CoreFoundation.h>
#include <Metal/Metal.h>