Failed to build electron app on macOS: Libsystem 'objc/NSObject.h' file not found

Hi there, I’m new to nix and trying to use home manager to manage my dev packages on my Mac, I was trying to build an electron app but ran into a problem. Here’s the log, I’m suspecting objective C is missing from the libsystem? What’s the best way to resolve this?

yarn run v1.22.19
$ gulp electron
[14:50:23] Using gulpfile ~/programming/repos/logseq/gulpfile.js
[14:50:23] Starting 'electron'...
$ electron-forge start
✔ Checking your system
✔ Locating application
✔ Loading configuration
✖ Preparing native dependencies: 1 / 2
  › node-gyp failed to rebuild '/Users/howard/programming/repos/logseq/static/node_modules/electron-deeplink'.
    For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
    Error: `make` failed with exit code: 2
◼ Running generateAssets hook

› make: Entering directory '/Users/howard/programming/repos/logseq/static/node_modules/electron-deeplink/build'
›   CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
›   LIBTOOL-STATIC Release/nothing.a
› warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
›   CXX(target) Release/obj.target/electron-deeplink/src/electron-deeplink.o
› In file included from ../src/electron-deeplink.mm:3:
  In file included from /nix/store/1ds96f193bdf7f3kz295rwf66q90vi71-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:60:
  In file included from /nix/store/1ds96f193bdf7f3kz295rwf66q90vi71-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:17:
  In file included from /nix/store/1ds96f193bdf7f3kz295rwf66q90vi71-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
  In file included from /nix/store/c834w8pg8ypl9lcaxqgj2bpsxbv518rn-Libsystem-1238.60.2/include/dispatch/dispatch.h:48:
  /nix/store/c834w8pg8ypl9lcaxqgj2bpsxbv518rn-Libsystem-1238.60.2/include/os/object.h:75:9: fatal error: 'objc/NSObject.h' file not found
› #import <objc/NSObject.h>
  ^~~~~~~~~~~~~~~~~
› 1 error generated.
› make: *** [electron-deeplink.target.mk:158: Release/obj.target/electron-deeplink/src/electron-deeplink.o] Error 1
› make: Leaving directory '/Users/howard/programming/repos/logseq/static/node_modules/electron-deeplink/build'

An unhandled rejection has occurred inside Forge:
Error: node-gyp failed to rebuild '/Users/howard/programming/repos/logseq/static/node_modules/electron-deeplink'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: `make` failed with exit code: 2
at NodeGyp.rebuildModule (/Users/howard/programming/repos/logseq/static/node_modules/@electron/rebuild/lib/src/module-type/node-gyp.js:120:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ModuleRebuilder.rebuildNodeGypModule (/Users/howard/programming/repos/logseq/static/node_modules/@electron/rebuild/lib/src/module-rebuilder.js:98:9)
    at async ModuleRebuilder.rebuild (/Users/howard/programming/repos/logseq/static/node_modules/@electron/rebuild/lib/src/module-rebuilder.js:128:14)
    at async Rebuilder.rebuildModuleAt (/Users/howard/programming/repos/logseq/static/node_modules/@electron/rebuild/lib/src/rebuild.js:149:13)
    at async Rebuilder.rebuild (/Users/howard/programming/repos/logseq/static/node_modules/@electron/rebuild/lib/src/rebuild.js:112:17)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[14:50:30] 'electron' errored after 6.47 s
[14:50:30] Error: Command failed: yarn electron:dev
    at checkExecSyncError (node:child_process:885:11)
    at Object.execSync (node:child_process:957:15)
    at exports.electron (/Users/howard/programming/repos/logseq/gulpfile.js:138:6)
    at taskWrapper (/Users/howard/programming/repos/logseq/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (node:domain:433:15)
    at runBound (node:domain:444:12)
    at asyncRunner (/Users/howard/programming/repos/logseq/node_modules/async-done/index.js:55:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

additional link: my nix flake