git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #160417 from steinybot/fix/iterm2-signing
commit14260bb7ba68fd8c7cc088b71d9ae947bdba4c10 authorSandro <sandro.jaeckel@gmail.com> dateSat 12 Mar 2022, 00:58 (5 years ago) parent9afbaab829ef15
2 files changed+35−30
maintainers/maintainer-list.nix+11 pkgs/applications/terminal-emulators/iterm2/default.nix+24−30
maintainers/maintainer-list.nix+11
@@ -11682,6 +11682,17 @@
1168211682 githubId = 55607356;
1168311683 name = "Stephan Heßelmann";
1168411684 };
11685+ steinybot = {
11686+ name = "Jason Pickens";
11687+ email = "jasonpickensnz@gmail.com";
11688+ matrix = "@steinybot:matrix.org";
11689+ github = "steinybot";
11690+ githubId = 4659562;
11691+ keys = [{
11692+ longkeyid = "ed25519/0x21DE1CAE59762A0F";
11693+ fingerprint = "2709 1DEC CC42 4635 4299 569C 21DE 1CAE 5976 2A0F";
11694+ }];
11695+ };
1168511696 stelcodes = {
1168611697 email = "stel@stel.codes";
1168711698 github = "stelcodes";
pkgs/applications/terminal-emulators/iterm2/default.nix+24−30
@@ -1,48 +1,42 @@
1−{ lib, stdenvNoCC, fetchFromGitHub }:
1+{ fetchzip, lib, stdenvNoCC }:
22
33 /*
4− This derivation is impure: it relies on an Xcode toolchain being installed
5− and available in the expected place. The values of sandboxProfile
6− are copied pretty directly from the MacVim derivation, which
7− is also impure. In order to build you at least need the `sandbox`
8− option set to `relaxed` or `false`.
4+ This cannot be built from source as it requires entitlements and
5+ for that it needs to be code signed. Automatic updates will have
6+ to be disabled via preferences instead of at build time. To do
7+ that edit $HOME/Library/Preferences/com.googlecode.iterm2.plist
8+ and add:
9+ SUEnableAutomaticChecks = 0;
910 */
1011
1112stdenvNoCC.mkDerivation rec {
1213 pname = "iterm2";
13− version = "3.4.14";
14+ version = "3.4.15";
1415
15− src = fetchFromGitHub {
16− owner = "gnachman";
17− repo = "iTerm2";
18− rev = "v${version}";
19− sha256 = "sha256-sDCnBO7xDpecu2cSjpHwync2DVsj9EKUmgpqEVLtxRM=";
16+ src = fetchzip {
17+ url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
18+ sha256 = "sha256-ZE/uYBKB2popdIdZWA8AvyJiwMzt32u6u/H/AyNcoVo=";
2019 };
2120
22− patches = [ ./disable_updates.patch ];
23− postPatch = ''
24− sed -i -e 's/CODE_SIGN_IDENTITY = "Developer ID Application"/CODE_SIGN_IDENTITY = ""/g' ./iTerm2.xcodeproj/project.pbxproj
25− '';
26−
27− preConfigure = "LD=$CC";
28− makeFlagsArray = ["Nix"];
2921 installPhase = ''
30− mkdir -p $out/Applications
31− mv Build/Products/Deployment/iTerm2.app $out/Applications/iTerm.app
32− '';
33−
34− sandboxProfile = ''
35− (allow file-read* file-write* process-exec mach-lookup)
36− ; block homebrew dependencies
37− (deny file-read* file-write* process-exec mach-lookup (subpath "/usr/local") (with no-log))
22+ runHook preInstall
23+ APP_DIR="$out/Applications/iTerm2.app"
24+ mkdir -p "$APP_DIR"
25+ cp -r . "$APP_DIR"
26+ mkdir -p "$out/bin"
27+ cat << EOF > "$out/bin/iterm2"
28+ #!${stdenvNoCC.shell}
29+ open -na "$APP_DIR" --args "$@"
30+ EOF
31+ chmod +x "$out/bin/iterm2"
32+ runHook postInstall
3833 '';
3934
4035 meta = with lib; {
4136 description = "A replacement for Terminal and the successor to iTerm";
4237 homepage = "https://www.iterm2.com/";
4338 license = licenses.gpl2;
44− maintainers = with maintainers; [ tricktron ];
45− platforms = platforms.darwin;
46− hydraPlatforms = [];
39+ maintainers = with maintainers; [ steinybot tricktron ];
40+ platforms = [ "x86_64-darwin" "aarch64-darwin" ];
4741 };
4842}