mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
3ea22dab7d
The fixup phase runs patch-shebangs, which modifies the shell integration scripts included the iTerm2.app bundle. This causes iTerm2 to be identified as damaged on macOS 13, which prevents it from running. This is due to changes in macOS 13 that checks signatures every time a notarized app is run on macOS 13. Since iTerm2 is using upstream’s build due to entitlements, it is notarized and must not be modified. See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more details on the changes.
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ fetchzip, lib, stdenvNoCC }:
|
|
|
|
/*
|
|
This cannot be built from source as it requires entitlements and
|
|
for that it needs to be code signed. Automatic updates will have
|
|
to be disabled via preferences instead of at build time. To do
|
|
that edit $HOME/Library/Preferences/com.googlecode.iterm2.plist
|
|
and add:
|
|
SUEnableAutomaticChecks = 0;
|
|
*/
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "iterm2";
|
|
version = "3.4.15";
|
|
|
|
src = fetchzip {
|
|
url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
|
|
sha256 = "sha256-ZE/uYBKB2popdIdZWA8AvyJiwMzt32u6u/H/AyNcoVo=";
|
|
};
|
|
|
|
dontFixup = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
APP_DIR="$out/Applications/iTerm2.app"
|
|
mkdir -p "$APP_DIR"
|
|
cp -r . "$APP_DIR"
|
|
mkdir -p "$out/bin"
|
|
cat << EOF > "$out/bin/iterm2"
|
|
#!${stdenvNoCC.shell}
|
|
open -na "$APP_DIR" --args "$@"
|
|
EOF
|
|
chmod +x "$out/bin/iterm2"
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A replacement for Terminal and the successor to iTerm";
|
|
homepage = "https://www.iterm2.com/";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ steinybot tricktron ];
|
|
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
|
};
|
|
}
|