From 7e56e35f56b2c1538fee1055d8033b069ab89453 Mon Sep 17 00:00:00 2001 From: Anton Iakimov Date: Thu, 22 Jun 2023 15:06:19 +0200 Subject: [PATCH] nix: add missing Apple SDKs to fix make test on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- nix/shell.nix | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/nix/shell.nix b/nix/shell.nix index edd6ae388b..b06cc48f7c 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -10,21 +10,26 @@ let in mkShell { name = "status-mobile-shell"; # for identifying all shells - buildInputs = with pkgs; lib.unique ([ - # core utilities that should always be present in a shell - bash curl wget file unzip flock procps - git gnumake jq ncurses gnugrep parallel - lsof # used in start-react-native.sh - # build specific utilities - clojure maven watchman - # lint specific utilities - clj-kondo zprint - # other nice to have stuff - yarn nodejs python310 - ] # and some special cases - ++ lib.optionals stdenv.isDarwin [ cocoapods clang tcl ] - ++ lib.optionals (!stdenv.isDarwin) [ gcc8 ] - ); + 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 + bash curl wget file unzip flock procps + git gnumake jq ncurses gnugrep parallel + lsof # used in start-react-native.sh + # build specific utilities + clojure maven watchman + # lint specific utilities + clj-kondo zprint + # other nice to have stuff + yarn nodejs python310 + ] # and some special cases + ++ lib.optionals stdenv.isDarwin ([ cocoapods clang tcl ] ++ appleSDKFrameworks) + ++ lib.optionals (!stdenv.isDarwin) [ gcc8 ] + ); # avoid terminal issues TERM="xterm";