2BMHPXLWOZ2YRXCLF7NECGDY7DJJG2DOL2VQFZFIJDMPC5DVDLNQC
GJL63N6O44LSRI3SGMJK23XKPTZ2G3M6CUF2T63MW3VMLORICFXAC
RXCY7LD6ZRIOIKZEYKLMCYPMQPXF4DOEEFBDLVR2B22BXLZJFFBQC
A3TVGLVHSVLMEHLHB3TPBSD3QGNVGX3DIK6BEBDTTHWBNW4ALMRAC
PNSLB3HLQELG4BZJYQB2T2R4ZFYQVPZHQZXAEOBCR4ZVMJ36LYNAC
EW5FQ4DJ4WES57CWPBTIK3IDW62SSJHWQCGUN4W236QIUTIPD64QC
JF5ZRQAQNCBHV6MPYXIQ5WUWM65JFKFJFNFRYJ4IR6PXS5GINNVAC
4PQLVNWBBLY23DPRDANHBRSSCGDCDH6Q4MVQAN2XXBI54CM22GMQC
mac-apps = {
lib,
config,
...
}: {
home.packages = [
pkgs.crawlTiles
pkgs.fwoar.iterm2
pkgs.emacs-git
];
home.activation.install-apps = lib.hm.dag.entryAfter ["linkGeneration"] ''
new_nix_apps="${config.home.homeDirectory}/Applications/Nix"
rm -rfv "$new_nix_apps"
mkdir -p "$new_nix_apps"
find -H -L "$genProfilePath/home-files/Applications" -maxdepth 2 -name "*.app" -type d -print | while read -r app; do
real_app=$(readlink -f "$app")
app_name=$(basename "$app")
target_app="$new_nix_apps/$app_name"
echo "Link '$real_app' to '$target_app'"
set -x
mkdir -p $target_app
"${pkgs.xorg.lndir}"/bin/lndir "$real_app" "$target_app"
rm "$target_app/Contents/Info.plist"
cp "$real_app/Contents/Info.plist" "$target_app/Contents/Info.plist"
set +x
done
'';
};
{ fetchzip, lib, stdenvNoCC, version }:
/*
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";
inherit version;
src = fetchzip {
url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
hash = "sha256-o2GCjQvpblV+6r9xhe5wFEy1harhgtnRrnKWUxWHF8E=";
};
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 ];
};
}
{ fetchzip, lib, stdenvNoCC, version }:
/*
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";
inherit version;
src = fetchzip {
url = "https://iterm2.com/downloads/stable/iTerm2-${lib.replaceStrings ["."] ["_"] version}.zip";
hash = "sha256-o2GCjQvpblV+6r9xhe5wFEy1harhgtnRrnKWUxWHF8E=";
};
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 ];
};
}