2022-03-30 09:31:56 +00:00
|
|
|
{ fetchzip, lib, stdenvNoCC }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
/*
|
2022-03-30 09:31:56 +00:00
|
|
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
*/
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "iterm2";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "3.4.18";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-jXaymp0GIM+UD51z1zsgz8OBHP1LiqKFGvrzutw8ecY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
dontFixup = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A replacement for Terminal and the successor to iTerm";
|
|
|
|
homepage = "https://www.iterm2.com/";
|
|
|
|
license = licenses.gpl2;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ steinybot tricktron ];
|
|
|
|
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|