tachyon: Add darwin support

wip/yesman
Jake Waksbaum 6 years ago
parent 4c0e25089e
commit 681d02ba5f
  1. 31
      pkgs/development/libraries/tachyon/darwin.patch
  2. 7
      pkgs/development/libraries/tachyon/default.nix

@ -0,0 +1,31 @@
diff --git a/unix/Make-arch b/unix/Make-arch
index 08afb85..822c4fc 100644
--- a/unix/Make-arch
+++ b/unix/Make-arch
@@ -924,7 +924,7 @@ macosx-thr:
$(MAKE) all \
"ARCH = macosx-thr" \
"CC = cc" \
- "CFLAGS = -Os -ffast-math -DBsd -DTHR -F/System/Library/Frameworks $(MISCFLAGS)" \
+ "CFLAGS = -Os -ffast-math -DBsd -DTHR $(MISCFLAGS)" \
"AR = ar" \
"ARFLAGS = r" \
"STRIP = strip" \
@@ -946,7 +946,7 @@ macosx-x86-thr:
$(MAKE) all \
"ARCH = macosx-x86-thr" \
"CC = cc" \
- "CFLAGS = -O2 -ffast-math -DBsd -DTHR -F/System/Library/Frameworks $(MISCFLAGS)" \
+ "CFLAGS = -O2 -ffast-math -DBsd -DTHR $(MISCFLAGS)" \
"AR = ar" \
"ARFLAGS = r" \
"STRIP = strip" \
@@ -957,7 +957,7 @@ macosx-x86-thr-ogl:
$(MAKE) all \
"ARCH = macosx-x86-thr-ogl" \
"CC = cc" \
- "CFLAGS = -O2 -ffast-math -DBsd -DTHR -I/usr/X11R6/include -F/System/Library/Frameworks $(MISCFLAGS) -DUSEOPENGL" \
+ "CFLAGS = -O2 -ffast-math -DBsd -DTHR -I/usr/X11R6/include $(MISCFLAGS) -DUSEOPENGL" \
"AR = ar" \
"ARFLAGS = r" \
"STRIP = strip" \

@ -50,7 +50,9 @@ stdenv.mkDerivation rec {
./no-absolute-paths.patch
# Include new targets (like arm)
./make-archs.patch
];
] ++
# Ensure looks for nix-provided Carbon, not system frameworks
stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
installPhase = ''
cd ../compile/${arch}
@ -66,8 +68,7 @@ stdenv.mkDerivation rec {
description = ''A Parallel / Multiprocessor Ray Tracing System'';
license = stdenv.lib.licenses.bsd3;
maintainers = [stdenv.lib.maintainers.raskin];
# darwin fails due to missing Carbon.h, even though Carbon is a build input
platforms = with stdenv.lib.platforms; linux ++ cygwin;
platforms = with stdenv.lib.platforms; linux ++ cygwin ++ darwin;
homepage = http://jedi.ks.uiuc.edu/~johns/tachyon/;
};
}

Loading…
Cancel
Save