Skip to content

Commit ae361c0

Browse files
jopriceanmonteiro
authored andcommitted
make cpu and host os dynamic
1 parent b1757d6 commit ae361c0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

overlay/default.nix

+5-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ in
153153
rev = "29349b9279ed24a73ec41acd7082caea9bd8c04e";
154154
sha256 = "sha256-VyY1clAdTEZu0cFy/+Bw19OQ4lb55s4gIV/7TsFKdnk=";
155155
};
156-
157156
nativeBuildInputs = with self; [
158157
gn
159158
ninja
@@ -169,6 +168,10 @@ in
169168
darwin.apple_sdk.frameworks.OpenGL
170169
# TODO handle ios, android
171170
#-framework CoreServices -framework CoreGraphics -framework CoreText -framework CoreFoundation
171+
] ++
172+
lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [ darwin.cctools ];
173+
patches = lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
174+
../ocaml/revery/patches/0002-esy-skia-use-libtool.patch
172175
];
173176

174177
preConfigure =
@@ -195,7 +198,7 @@ in
195198
configurePhase = ''
196199
runHook preConfigure
197200
gn gen out/Release \
198-
--args='is_debug=false is_official_build=true skia_use_egl=false skia_use_dng_sdk=false skia_enable_tools=false extra_asmflags=[] target_cpu="arm64" host_os="mac" skia_enable_gpu=true skia_use_metal=true skia_use_vulkan=false skia_use_angle=false skia_use_fontconfig=false skia_use_freetype=false skia_enable_pdf=false skia_use_sfntly=false skia_use_icu=false skia_use_libwebp=false skia_use_libpng=true esy_skia_enable_svg=true'
201+
--args='is_debug=false is_official_build=true skia_use_egl=false skia_use_dng_sdk=false skia_enable_tools=false extra_asmflags=[] host_os="${if stdenv.isDarwin then "mac" else "linux"}" skia_enable_gpu=true skia_use_metal=true skia_use_vulkan=false skia_use_angle=false skia_use_fontconfig=false skia_use_freetype=false skia_enable_pdf=false skia_use_sfntly=false skia_use_icu=false skia_use_libwebp=false skia_use_libpng=true esy_skia_enable_svg=true target_cpu="${if stdenv.isAarch64 then "arm64" else "x86_64"}"'
199202
runHook postConfigure
200203
'';
201204
buildPhase = ''

0 commit comments

Comments
 (0)