diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -8,15 +8,16 @@ outputs = { self, nixpkgs, utils, ... }: let - # Overlays allow for extending a package set, in this case, we are extending nixpkgs - # with our devShell + # Overlays allow for extending a package set, in this case, we are + # extending nixpkgs with our devShell localOverlay = import ./nix/overlay.nix; overlays = [ localOverlay ]; - # Since we build for many systems (e.g. m1 mac, x86_64-linux), we create - # a helper function to help facilitate instantiation of the related package set + # Since we build for many systems (e.g. aarch64, x86_64-linux), we + # create a helper function to help facilitate instantiation of the related + # package set pkgsForSystem = system: import nixpkgs { inherit overlays system; }; @@ -28,8 +29,9 @@ legacyPackages = pkgsForSystem system; inherit (legacyPackages) devShell; }) // { - # these outputs will lack the system suffix (e.g. devShell.aarch64-darwin), thus should - # be system agnostic such as overlays or utility functions. + # these outputs will lack the system suffix (e.g. + # devShell.aarch64-darwin), thus should be system agnostic such as + # overlays or utility functions. overlays = { inherit localOverlay; }; overlay = localOverlay; }; diff --git a/keyserver/bash/source-nvm.sh b/keyserver/bash/source-nvm.sh --- a/keyserver/bash/source-nvm.sh +++ b/keyserver/bash/source-nvm.sh @@ -4,7 +4,10 @@ # source from: package.json (via npm/yarn scripts) unset PREFIX -[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # Intel Mac -[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh" # M1 Mac -[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # Ubuntu +# Intel Mac +[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" +# ARM-based Mac +[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh" +# Ubuntu +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" nvm install --no-progress diff --git a/keyserver/docker-compose.yml b/keyserver/docker-compose.yml --- a/keyserver/docker-compose.yml +++ b/keyserver/docker-compose.yml @@ -28,8 +28,9 @@ restart: always expose: - "3306" - # There is no M1 build on Docker Hub, so we force x64 - # This is what we want in production anyways. M1 devs will have it emulated + # There is no ARM-based Mac build on Docker Hub, so we force x64 + # This is what we want in production anyways. ARM-based Mac devs will have + # it emulated platform: linux/amd64 command: > --max-allowed-packet=64M diff --git a/native/ios/Podfile b/native/ios/Podfile --- a/native/ios/Podfile +++ b/native/ios/Podfile @@ -42,9 +42,11 @@ pod 'OLMKit', :path => "../../node_modules/olm" pod 'RCT-Folly', :podspec => "../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" - # Lines below are only needed to compile and use Expo Secure Store in Notification Service. - # If Apple disapproves 'APPLICATION_EXTENSION_API_ONLY' flag then we can safely delete them and use - # customized Expo Secure Store that does not depend on ExpoModulesCore + # Lines below are only needed to compile and use Expo Secure Store in + # Notification Service. + # If Apple disapproves 'APPLICATION_EXTENSION_API_ONLY' flag then we can + # safely delete them and use customized Expo Secure Store that does not depend + # on ExpoModulesCore podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {} use_expo_modules! use_react_native!( @@ -57,16 +59,18 @@ react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) - # Excluding arm64 because M1 simulator isn't supported yet + # Excluding arm64 because ARM-based Mac simulator isn't supported yet # Excluding 32-bit x86 because nobody uses it and it causes compilation issues installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64 i386" config.build_settings['OTHER_CPLUSPLUSFLAGS'] = '-DDONT_AUTOINSTALL_REANIMATED' end - # Lines below are only needed to compile and use Expo Secure Store in Notification Service. - # If Apple disapproves 'APPLICATION_EXTENSION_API_ONLY' flag then we can safely delete them and use - # customized Expo Secure Store that does not depend on ExpoModulesCore + # Lines below are only needed to compile and use Expo Secure Store in + # Notification Service. + # If Apple disapproves 'APPLICATION_EXTENSION_API_ONLY' flag then we can + # safely delete them and use customized Expo Secure Store that does not depend + # on ExpoModulesCore installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'