2022-02-16 23:20:30 +00:00
|
|
|
{ fetchzip, lib, stdenvNoCC }:
|
2016-05-31 14:51:30 +01:00
|
|
|
|
2020-03-01 14:53:39 +00:00
|
|
|
/*
|
2022-02-16 23:20:30 +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-03-01 14:53:39 +00:00
|
|
|
*/
|
|
|
|
|
2021-11-26 02:55:45 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "iterm2";
|
2024-08-17 21:46:36 +01:00
|
|
|
version = "3.5.4";
|
2016-05-31 14:51:30 +01:00
|
|
|
|
2022-02-16 23:20:30 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
|
2024-08-17 21:46:36 +01:00
|
|
|
hash = "sha256-Sxj8OnaXh+UdAAf2hoHBQ8TuczYykhV37XvalNpwq7U=";
|
2016-05-31 14:51:30 +01:00
|
|
|
};
|
|
|
|
|
2022-08-14 01:12:11 +01:00
|
|
|
dontFixup = true;
|
|
|
|
|
2016-05-31 14:51:30 +01:00
|
|
|
installPhase = ''
|
2022-02-16 23:20:30 +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
|
2016-05-31 14:51:30 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-05-31 14:51:30 +01:00
|
|
|
description = "Replacement for Terminal and the successor to iTerm";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.iterm2.com/";
|
2024-06-24 12:44:46 +01:00
|
|
|
hydraPlatforms = []; # The build is little more than copying the binary
|
2020-03-01 14:53:39 +00:00
|
|
|
license = licenses.gpl2;
|
2022-02-16 23:20:30 +00:00
|
|
|
maintainers = with maintainers; [ steinybot tricktron ];
|
|
|
|
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
2024-06-24 12:44:46 +01:00
|
|
|
sourceProvenance = [ sourceTypes.binaryNativeCode ];
|
2016-05-31 14:51:30 +01:00
|
|
|
};
|
|
|
|
}
|