Skip to content

Commit

Permalink
make cpu and host os dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
joprice authored and anmonteiro committed Jul 21, 2023
1 parent b1757d6 commit ae361c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions overlay/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ in
rev = "29349b9279ed24a73ec41acd7082caea9bd8c04e";
sha256 = "sha256-VyY1clAdTEZu0cFy/+Bw19OQ4lb55s4gIV/7TsFKdnk=";
};

nativeBuildInputs = with self; [
gn
ninja
Expand All @@ -169,6 +168,10 @@ in
darwin.apple_sdk.frameworks.OpenGL
# TODO handle ios, android
#-framework CoreServices -framework CoreGraphics -framework CoreText -framework CoreFoundation
] ++
lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [ darwin.cctools ];
patches = lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
../ocaml/revery/patches/0002-esy-skia-use-libtool.patch
];

preConfigure =
Expand All @@ -195,7 +198,7 @@ in
configurePhase = ''
runHook preConfigure
gn gen out/Release \
--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'
--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"}"'
runHook postConfigure
'';
buildPhase = ''
Expand Down

0 comments on commit ae361c0

Please sign in to comment.