Files
nixpkgs/pkgs/by-name/it/iterm2/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

59 lines
1.4 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.5.14";
src = fetchzip {
url = "https://iterm2.com/downloads/stable/iTerm2-${
lib.replaceStrings [ "." ] [ "_" ] version
}.zip";
hash = "sha256-cF7gg4kT0z/7Qu7d6AyXpnvrSQ937JbFUgpXw5F4AWE=";
};
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 = "Replacement for Terminal and the successor to iTerm";
homepage = "https://www.iterm2.com/";
hydraPlatforms = [ ]; # The build is little more than copying the binary
license = licenses.gpl2;
maintainers = with maintainers; [
steinybot
tricktron
];
platforms = [
"x86_64-darwin"
"aarch64-darwin"
];
sourceProvenance = [ sourceTypes.binaryNativeCode ];
};
}