depot/third_party/nixpkgs/pkgs/applications/terminal-emulators/iterm2/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

44 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.23";
src = fetchzip {
url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
hash = "sha256-hQV/jGT/3JOvHBICyCeNnuSYMeeF7lfErN55f+Frg2w=";
};
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" ];
};
}