Siddarth Kumar 10b97843ce
feat: add xcbeautify to iOS shell (#18273)
I can't remember the number of times I have had to ask developers to run `make run-ios | xcbeautify` when debugging iOS build failures and they do not have `xcbeautify` installed on their environment.

`xcbeautify` helps make `xcodebuild` output more readable and to identify problems quickly.

This commit adds `xcbeautify` to iOS shell and to  `make run-ios` so that we get readable output by default.
2023-12-22 19:45:59 +05:30

36 lines
898 B
Nix

{ 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;
};
}