···2121 };
22222323 patches = [
2424- # fsevents is needed on Darwin, but its dependency "nan" in the upstream package-lock.json
2525- # is too old for the Node 18.x in Nixpkgs.
2626- # This patch is generated by checking out the upstream source and running
2727- # npm update nan --lockfile-version 1
2828- ./update-nan.patch
2424+ # Remove the dependency on "nodemon", which is only needed for interactive
2525+ # development. This package depends on fsevents on macOS, which has
2626+ # repeatedly caused build problems. This patch is generated by checking out
2727+ # the upstream source and removing the "nodemon" line, and then running
2828+ #
2929+ # npm install --lockfile-version 1
3030+ ./remove-nodemon.patch
2931 ];
30323131- npmDepsHash = "sha256-mV6rWNf2p2w4H0ESUT0/Ybtx9YEdvO5l2gCvlWFXK+U=";
3333+ npmDepsHash = "sha256-GyNUPgLJhdjzbIpld916/l8durIw0aQRHojjSmGgEJE=";
3234 nativeBuildInputs = [
3335 node-gyp
3436 python3
···4345 cp -r build_old/Release build/
4446 rm -rf build_old
4547 rm -rf build/Release/.deps
4848+4649 # Remove a development script to eliminate runtime dependency on node
4750 rm node_modules/node-addon-api/tools/conversion.js
5151+5252+ # Remove dangling symlinks
5353+ rm -rf $out/lib/node_modules/nodehun/node_modules/.bin
4854 '';
49555056 doInstallCheck = true;