nix: add missing Apple SDKs to fix make test on macOS

Fixes following error:
```
ld: framework not found IOKit
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [status_nodejs_addon.target.mk:175: Release/status_nodejs_addon.node] Error 1
```
The `make test` target started to fail on macOS after #14944.

This PR adds 2 Apple SDK frameworks to default shell: `IOKit` and `CoreServices`

The other 2 mentioned in `binding.gyp` are not added, but build is ok.

Resolves: https://github.com/status-im/status-mobile/issues/16356

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Anton Iakimov 2023-06-22 15:06:19 +02:00 committed by Jakub Sokołowski
parent 5e6d488a3e
commit 7e56e35f56
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
1 changed files with 20 additions and 15 deletions

View File

@ -10,7 +10,12 @@ let
in mkShell { in mkShell {
name = "status-mobile-shell"; # for identifying all shells name = "status-mobile-shell"; # for identifying all shells
buildInputs = with pkgs; lib.unique ([ buildInputs = let
appleSDKFrameworks = (with pkgs.darwin.apple_sdk.frameworks; [
IOKit CoreServices
]);
in
with pkgs; lib.unique ([
# core utilities that should always be present in a shell # core utilities that should always be present in a shell
bash curl wget file unzip flock procps bash curl wget file unzip flock procps
git gnumake jq ncurses gnugrep parallel git gnumake jq ncurses gnugrep parallel
@ -22,7 +27,7 @@ in mkShell {
# other nice to have stuff # other nice to have stuff
yarn nodejs python310 yarn nodejs python310
] # and some special cases ] # and some special cases
++ lib.optionals stdenv.isDarwin [ cocoapods clang tcl ] ++ lib.optionals stdenv.isDarwin ([ cocoapods clang tcl ] ++ appleSDKFrameworks)
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ] ++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]
); );