Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xcbeautify to iOS shell and to make run-ios #18273

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ run-ios: export TARGET := ios
run-ios: export IOS_STATUS_GO_TARGETS := iossimulator/amd64
run-ios: ##@run Build iOS app and start it in a simulator/device
ifneq ("$(SIMULATOR)", "")
npx react-native run-ios --simulator="$(SIMULATOR)"
npx react-native run-ios --simulator="$(SIMULATOR)" | xcbeautify
else
npx react-native run-ios
npx react-native run-ios | xcbeautify
endif

show-ios-devices: ##@other shows connected ios device and its name
Expand Down
1 change: 1 addition & 0 deletions nix/mobile/ios/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ in {
xcodeWrapper watchman procps
flock # used in nix/scripts/node_modules.sh
ios-deploy # used in 'make run-ios-device'
xcbeautify # used in 'make run-ios'
];

# WARNING: Executes shellHook in reverse order.
Expand Down
1 change: 1 addition & 0 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ in {
aapt2 = callPackage ./pkgs/aapt2 { };
patchMavenSources = callPackage ./pkgs/patch-maven-srcs { };
goMavenResolver = callPackage ./pkgs/go-maven-resolver { };
xcbeautify = callPackage ./pkgs/xcbeautify { };
}
35 changes: 35 additions & 0 deletions nix/pkgs/xcbeautify/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ stdenv, fetchurl, unzip, lib }:

let
inherit (lib) getAttr;
in
stdenv.mkDerivation rec {
pname = "xcbeautify";
version = "1.1.1";
arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x86_64";

src = fetchurl {
url = "https://github.com/tuist/xcbeautify/releases/download/${version}/xcbeautify-${version}-${arch}-apple-macosx.zip";
sha256 = getAttr arch {
arm64 = "sha256-VaZBWZNx5iZxjpsVbKQA4wVsigjlhArDCsQXY/RBDx4=";
x86_64 = "sha256-Q1t4nHQu05mPqNRmL0KQukGRAHdkQHM7H24ar0isQTo=";
};
};

buildInputs = [ unzip ];

unpackPhase = ''
unzip $src
'';

installPhase = ''
install -D xcbeautify $out/bin/xcbeautify
'';

meta = with lib; {
description = "A little beautifier tool for xcodebuild";
homepage = "https://github.com/tuist/xcbeautify";
license = licenses.mit;
platforms = platforms.darwin;
};
}