git.iko.soy/typeable/nixpkgs
on master help sign in
tachyon: fix darwin build (#123558)
commit3ac820e157f882f886f20bd20d9a1b539e011303 authorStéphan Kochen <git@stephank.nl> dateTue 18 May 2021, 23:10 (6 years ago) parent4b14908
2 files changed+7−34
pkgs/development/libraries/tachyon/darwin.patch−31 pkgs/development/libraries/tachyon/default.nix+7−3
pkgs/development/libraries/tachyon/darwin.patchdeleted−31
@@ -1,31 +0,0 @@
1−diff --git a/unix/Make-arch b/unix/Make-arch
2−index 08afb85..822c4fc 100644
3−--- a/unix/Make-arch
4−+++ b/unix/Make-arch
5−@@ -924,7 +924,7 @@ macosx-thr:
6− $(MAKE) all \
7− "ARCH = macosx-thr" \
8− "CC = cc" \
9−- "CFLAGS = -Os -ffast-math -DBsd -DTHR -F/System/Library/Frameworks $(MISCFLAGS)" \
10−+ "CFLAGS = -Os -ffast-math -DBsd -DTHR $(MISCFLAGS)" \
11− "AR = ar" \
12− "ARFLAGS = r" \
13− "STRIP = strip" \
14−@@ -946,7 +946,7 @@ macosx-x86-thr:
15− $(MAKE) all \
16− "ARCH = macosx-x86-thr" \
17− "CC = cc" \
18−- "CFLAGS = -O2 -ffast-math -DBsd -DTHR -F/System/Library/Frameworks $(MISCFLAGS)" \
19−+ "CFLAGS = -O2 -ffast-math -DBsd -DTHR $(MISCFLAGS)" \
20− "AR = ar" \
21− "ARFLAGS = r" \
22− "STRIP = strip" \
23−@@ -957,7 +957,7 @@ macosx-x86-thr-ogl:
24− $(MAKE) all \
25− "ARCH = macosx-x86-thr-ogl" \
26− "CC = cc" \
27−- "CFLAGS = -O2 -ffast-math -DBsd -DTHR -I/usr/X11R6/include -F/System/Library/Frameworks $(MISCFLAGS) -DUSEOPENGL" \
28−+ "CFLAGS = -O2 -ffast-math -DBsd -DTHR -I/usr/X11R6/include $(MISCFLAGS) -DUSEOPENGL" \
29− "AR = ar" \
30− "ARFLAGS = r" \
31− "STRIP = strip" \
pkgs/development/libraries/tachyon/default.nix+7−3
@@ -48,14 +48,18 @@ stdenv.mkDerivation rec {
4848 if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else
4949 throw "Don't know what arch to select for tachyon build";
5050 makeFlags = [ arch ];
51+
5152 patches = [
5253 # Remove absolute paths in Make-config (and unset variables so they can be set in preBuild)
5354 ./no-absolute-paths.patch
5455 # Include new targets (like arm)
5556 ./make-archs.patch
56− ] ++
57− # Ensure looks for nix-provided Carbon, not system frameworks
58− lib.optional stdenv.isDarwin ./darwin.patch;
57+ ];
58+ postPatch = ''
59+ # Ensure looks for nix-provided Carbon, not system frameworks
60+ substituteInPlace unix/Make-arch \
61+ --replace '-F/System/Library/Frameworks' ""
62+ '';
5963
6064 installPhase = ''
6165 cd ../compile/${arch}