Skip to content

Commit

Permalink
Merge pull request #45006 from jbaum98/tachyon-darwin
Browse files Browse the repository at this point in the history
tachyon: Add darwin support
  • Loading branch information
adisbladis committed Aug 14, 2018
2 parents a38a2ba + 681d02b commit 3878342
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
31 changes: 31 additions & 0 deletions pkgs/development/libraries/tachyon/darwin.patch
@@ -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" \
7 changes: 4 additions & 3 deletions pkgs/development/libraries/tachyon/default.nix
Expand Up @@ -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}
Expand All @@ -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/;
};
}

0 comments on commit 3878342

Please sign in to comment.