···9 unpackFile ${libcxxabi.src}
10 export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
11 '';
12+13+ # on next rebuild, this can be replaced with optionals; for now set to null to avoid
14+ # patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
15+ patches = if stdenv.hostPlatform.isMusl then [
16 ../../libcxx-0001-musl-hacks.patch
17+ ] else null;
18+19 prePatch = ''
20 substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
21 '';