about summary refs log tree commit diff
path: root/pkgs/top-level/emscripten-packages.nix
diff options
context:
space:
mode:
authorWill Cohen <willcohen@users.noreply.github.com>2023-05-22 09:02:01 -0400
committerWill Cohen <willcohen@users.noreply.github.com>2023-05-22 09:23:38 -0400
commit5d0918ec3ca8035720b35a260e0318a2c92dc634 (patch)
tree10792c235763b4c2e0d34476acd9155f7f170abf /pkgs/top-level/emscripten-packages.nix
parent3ce345322d8a2f04c15ec246034db51ae3869926 (diff)
emscriptenPackages.libxml2: fix build on darwin
Diffstat (limited to 'pkgs/top-level/emscripten-packages.nix')
-rw-r--r--pkgs/top-level/emscripten-packages.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/top-level/emscripten-packages.nix b/pkgs/top-level/emscripten-packages.nix
index 15baf5ba72910..f4d2fd06a90cd 100644
--- a/pkgs/top-level/emscripten-packages.nix
+++ b/pkgs/top-level/emscripten-packages.nix
@@ -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"