nixpkgs/pkgs/applications/misc/iterm2/default.nix
Matthew Glazar 689e1efda0 iterm2: fix build
During iterm2's build, xcodebuild invokes $LD and passes it options such
as -isysroot. These options are intended for the linker driver (clang),
not for the linker directly. ld64 ($LD) does not recognize these
options, causing iterm2's build to fail.

Set $LD to $CC (clang) as intended, making iterm2's build succeed.
2019-03-28 20:44:08 -07:00

31 lines
878 B
Nix

{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "iterm2-${version}";
version = "3.0.14";
src = fetchFromGitHub {
owner = "gnachman";
repo = "iTerm2";
rev = "v${version}";
sha256 = "03m0ja11w9910z96yi8fzq3436y8xl14q031rdb2w3sapjd54qrj";
};
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 = ["Deployment"];
installPhase = ''
mkdir -p "$out/Applications"
mv "build/Deployment/iTerm2.app" "$out/Applications/iTerm.app"
'';
meta = {
description = "A replacement for Terminal and the successor to iTerm";
homepage = https://www.iterm2.com/;
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.darwin;
};
}