Skip to content

Commit 5c82347

Browse files
committed
wip
1 parent d913ea9 commit 5c82347

File tree

1 file changed

+73
-74
lines changed

1 file changed

+73
-74
lines changed

overlay/default.nix

Lines changed: 73 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -145,88 +145,87 @@ in
145145
opaline = null;
146146
ott = super.ott.override { opaline = self.ocamlPackages.opaline; };
147147
esy = callPackage ../ocaml/esy { };
148-
esy-skia =
149-
let
150-
angle2 = fetchgit {
151-
url = "https://chromium.googlesource.com/angle/angle.git";
152-
rev = "47b3db22be33213eea4ad58f2453ee1088324ceb";
153-
sha256 = "sha256-ZF5wDOqh3cRfQGwOMay//4aWh9dBWk/cLmUsx+Ab2vw=";
154-
};
155-
piex = fetchgit {
156-
url = "https://android.googlesource.com/platform/external/piex.git";
157-
rev = "bb217acdca1cc0c16b704669dd6f91a1b509c406";
158-
sha256 = "05ipmag6k55jmidbyvg5mkqm69zfw03gfkqhi9jnjlmlbg31y412";
159-
};
160-
in
161-
162-
stdenv.mkDerivation rec {
163-
name = "skia";
164-
src = fetchFromGitHub {
165-
owner = "revery-ui";
166-
repo = "esy-skia";
167-
rev = "29349b9279ed24a73ec41acd7082caea9bd8c04e";
168-
sha256 = "sha256-VyY1clAdTEZu0cFy/+Bw19OQ4lb55s4gIV/7TsFKdnk=";
169-
};
148+
esy-skia = stdenv.mkDerivation rec {
149+
name = "skia";
150+
src = fetchFromGitHub {
151+
owner = "revery-ui";
152+
repo = "esy-skia";
153+
rev = "29349b9279ed24a73ec41acd7082caea9bd8c04e";
154+
sha256 = "sha256-VyY1clAdTEZu0cFy/+Bw19OQ4lb55s4gIV/7TsFKdnk=";
155+
};
170156

171-
nativeBuildInputs = with self; [
172-
gn
173-
ninja
174-
libjpeg
175-
libpng
176-
zlib
177-
python3
178-
expat
179-
# TODO: add optional webp support
180-
#libwebp
181-
darwin.apple_sdk.frameworks.ApplicationServices
182-
darwin.apple_sdk.frameworks.AppKit
183-
darwin.apple_sdk.frameworks.OpenGL
184-
# TODO handle ios, android
185-
#-framework CoreServices -framework CoreGraphics -framework CoreText -framework CoreFoundation
186-
];
157+
nativeBuildInputs = with self; [
158+
gn
159+
ninja
160+
libjpeg
161+
libpng
162+
zlib
163+
python3
164+
expat
165+
# TODO: add optional webp support
166+
#libwebp
167+
darwin.apple_sdk.frameworks.ApplicationServices
168+
darwin.apple_sdk.frameworks.AppKit
169+
darwin.apple_sdk.frameworks.OpenGL
170+
# TODO handle ios, android
171+
#-framework CoreServices -framework CoreGraphics -framework CoreText -framework CoreFoundation
172+
];
187173

188-
preConfigure = ''
174+
preConfigure =
175+
let
176+
angle2 = fetchgit {
177+
url = "https://chromium.googlesource.com/angle/angle.git";
178+
rev = "47b3db22be33213eea4ad58f2453ee1088324ceb";
179+
sha256 = "sha256-ZF5wDOqh3cRfQGwOMay//4aWh9dBWk/cLmUsx+Ab2vw=";
180+
};
181+
piex = fetchgit {
182+
url = "https://android.googlesource.com/platform/external/piex.git";
183+
rev = "bb217acdca1cc0c16b704669dd6f91a1b509c406";
184+
sha256 = "05ipmag6k55jmidbyvg5mkqm69zfw03gfkqhi9jnjlmlbg31y412";
185+
};
186+
in
187+
''
189188
mkdir -p third_party/externals
190189
ln -s ${angle2} third_party/externals/angle2
191190
ln -s ${piex} third_party/externals/piex
192191
'';
193192

194-
#TODO: built this based on feature flags, with sane defaults per os
195-
#TODO: enable more features
196-
configurePhase = ''
197-
runHook preConfigure
198-
gn gen out/Release \
199-
--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'
200-
runHook postConfigure
201-
'';
202-
buildPhase = ''
203-
runHook preBuild
204-
ninja -C out/Release skia
205-
runHook postBuild
206-
'';
193+
#TODO: built this based on feature flags, with sane defaults per os
194+
#TODO: enable more features
195+
configurePhase = ''
196+
runHook preConfigure
197+
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'
199+
runHook postConfigure
200+
'';
201+
buildPhase = ''
202+
runHook preBuild
203+
ninja -C out/Release skia
204+
runHook postBuild
205+
'';
207206

208-
# TODO: these includes were taken from alperite and can probably be simplified to include everything
209-
installPhase = ''
210-
mkdir -p $out
211-
212-
# Glob will match all subdirs.
213-
shopt -s globstar
214-
215-
cp -r --parents -t $out/ \
216-
include/codec \
217-
include/config \
218-
include/core \
219-
include/effects \
220-
include/gpu \
221-
include/private \
222-
include/utils \
223-
include/c \
224-
out/Release/*.a \
225-
src/gpu/**/*.h \
226-
third_party/externals/angle2/include \
227-
third_party/skcms/**/*.h
228-
'';
229-
};
207+
# TODO: these includes were taken from alperite and can probably be simplified to include everything
208+
installPhase = ''
209+
mkdir -p $out
210+
211+
# Glob will match all subdirs.
212+
shopt -s globstar
213+
214+
cp -r --parents -t $out/ \
215+
include/codec \
216+
include/config \
217+
include/core \
218+
include/effects \
219+
include/gpu \
220+
include/private \
221+
include/utils \
222+
include/c \
223+
out/Release/*.a \
224+
src/gpu/**/*.h \
225+
third_party/externals/angle2/include \
226+
third_party/skcms/**/*.h
227+
'';
228+
};
230229

231230
h2spec = self.buildGoModule {
232231
pname = "h2spec";

0 commit comments

Comments
 (0)