diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2020-10-27 22:38:58 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2020-10-28 10:22:39 -0300 |
commit | 2bb3a9da24ca60d9f5bed69f679a1ec50dbdf997 (patch) | |
tree | 23f671aff1d1de5a1530a39004fc373e045a4504 /pkgs/applications/terminal-emulators/iterm2 | |
parent | c3feda093d342da8f12ac710f64ac341812bb455 (diff) |
A directory-category for terminal emulators
This is a mostly cosmetical commit, in the sense it doesn't change the contents of any package, but reorganizes the overall Nixpkgs expressions. Terminal emulators are an ubiquitous tool for any Unix user; even the beginners are routinely familiarized to it. And, manifestly, there are many implementations of terminal emulators out there, from those traditionally made in C and C++ to those written in Haskell and Go. Terminal emulators deserve more highlight. This commit does that by creating a category for them.
Diffstat (limited to 'pkgs/applications/terminal-emulators/iterm2')
-rw-r--r-- | pkgs/applications/terminal-emulators/iterm2/default.nix | 48 | ||||
-rw-r--r-- | pkgs/applications/terminal-emulators/iterm2/disable_updates.patch | 11 |
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/applications/terminal-emulators/iterm2/default.nix b/pkgs/applications/terminal-emulators/iterm2/default.nix new file mode 100644 index 0000000000000..e273eda45c315 --- /dev/null +++ b/pkgs/applications/terminal-emulators/iterm2/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchFromGitHub }: + + /* + This derivation is impure: it relies on an Xcode toolchain being installed + and available in the expected place. The values of sandboxProfile + are copied pretty directly from the MacVim derivation, which + is also impure. In order to build you at least need the `sandbox` + option set to `relaxed` or `false`. + */ + +stdenv.mkDerivation rec { + pname = "iterm2"; + version = "3.3.9"; + + src = fetchFromGitHub { + owner = "gnachman"; + repo = "iTerm2"; + rev = "v${version}"; + sha256 = "06mq3gfjgy8jw2f3fzdsi3pbfkdijfzzlhlw6ixa5bfb4hbcgn5j"; + }; + + patches = [ ./disable_updates.patch ]; + postPatch = '' + sed -i -e 's/CODE_SIGN_IDENTITY = "Developer ID Application"/CODE_SIGN_IDENTITY = ""/g' ./iTerm2.xcodeproj/project.pbxproj + ''; + + preConfigure = "LD=$CC"; + makeFlagsArray = ["Nix"]; + installPhase = '' + mkdir -p $out/Applications + mv Build/Products/Deployment/iTerm2.app $out/Applications/iTerm.app + ''; + + sandboxProfile = '' + (allow file-read* file-write* process-exec mach-lookup) + ; block homebrew dependencies + (deny file-read* file-write* process-exec mach-lookup (subpath "/usr/local") (with no-log)) + ''; + + meta = with stdenv.lib; { + description = "A replacement for Terminal and the successor to iTerm"; + homepage = "https://www.iterm2.com/"; + license = licenses.gpl2; + maintainers = with maintainers; [ tricktron ]; + platforms = platforms.darwin; + hydraPlatforms = []; + }; +} diff --git a/pkgs/applications/terminal-emulators/iterm2/disable_updates.patch b/pkgs/applications/terminal-emulators/iterm2/disable_updates.patch new file mode 100644 index 0000000000000..e717c58f30f16 --- /dev/null +++ b/pkgs/applications/terminal-emulators/iterm2/disable_updates.patch @@ -0,0 +1,11 @@ +--- iTerm2/sources/iTermPreferences.m 2016-06-23 16:55:28.000000000 +0200 ++++ iTerm2/sources/iTermPreferences.m 2016-06-23 16:55:42.000000000 +0200 +@@ -189,7 +189,7 @@ + kPreferenceKeyInstantReplayMemoryMegabytes: @4, + kPreferenceKeySavePasteAndCommandHistory: @NO, + kPreferenceKeyAddBonjourHostsToProfiles: @NO, +- kPreferenceKeyCheckForUpdatesAutomatically: @YES, ++ kPreferenceKeyCheckForUpdatesAutomatically: @NO, + kPreferenceKeyCheckForTestReleases: @NO, + kPreferenceKeyLoadPrefsFromCustomFolder: @NO, + kPreferenceKeyNeverRemindPrefsChangesLostForFileHaveSelection: @NO, |