···71 };
7273 patches = [
00074 # Upstream C++ wrap script only defines fixed-sized integers on macOS but
75 # this is required on aarch64-linux too.
76 ./fix-cpp-build.patch
77 ];
7879 postPatch = ''
80- substituteInPlace Makerules --replace "(shell pkg-config" "(shell $PKG_CONFIG"
8182 patchShebangs scripts/mupdfwrap.py
83···8687 # fix libclang unnamed struct format
88 for wrapper in ./scripts/wrap/{cpp,state}.py; do
89- substituteInPlace "$wrapper" --replace 'struct (unnamed' '(unnamed struct'
90 done
91 '';
92···259260 enableParallelBuilding = true;
261262- env.USE_SONAME = "yes";
263264 passthru = {
265 tests = {
···71 };
7273 patches = [
74+ # Upstream makefile does not work with system deps on macOS by default, so
75+ # we reuse the Linux section instead.
76+ ./fix-darwin-system-deps.patch
77 # Upstream C++ wrap script only defines fixed-sized integers on macOS but
78 # this is required on aarch64-linux too.
79 ./fix-cpp-build.patch
80 ];
8182 postPatch = ''
83+ substituteInPlace Makerules --replace-fail "(shell pkg-config" "(shell $PKG_CONFIG"
8485 patchShebangs scripts/mupdfwrap.py
86···8990 # fix libclang unnamed struct format
91 for wrapper in ./scripts/wrap/{cpp,state}.py; do
92+ substituteInPlace "$wrapper" --replace-fail 'struct (unnamed' '(unnamed struct'
93 done
94 '';
95···262263 enableParallelBuilding = true;
264265+ env.USE_SONAME = if (stdenv.hostPlatform.isDarwin) then "no" else "yes";
266267 passthru = {
268 tests = {