emscriptenPackages.libxml2: fix build on darwin

This commit is contained in:
Will Cohen 2023-05-22 09:02:01 -04:00
parent 3ce345322d
commit 5d0918ec3c

View file

@ -66,7 +66,10 @@ rec {
echo "Compiling a custom test"
set -x
emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 xmllint.o \
./.libs/libxml2.a `pkg-config zlib --cflags` `pkg-config zlib --libs` -o ./xmllint.test.js \
./.libs/''
+ pkgs.lib.optionalString pkgs.stdenv.isDarwin "libxml2.dylib "
+ pkgs.lib.optionalString (!pkgs.stdenv.isDarwin) "libxml2.a "
+ '' `pkg-config zlib --cflags` `pkg-config zlib --libs` -o ./xmllint.test.js \
--embed-file ./test/xmlid/id_err1.xml
echo "Using node to execute the test which basically outputs an error on stderr which we grep for"