{ description = "Ghostty AppImage"; inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; }; outputs = { self, nixpkgs }: let upstreamVersion = "1.1.0"; appimageVersion = "v1.1.0+1"; exename = "ghostty"; mkGhostty = system: let pkgs = import nixpkgs { inherit system; }; arch = if system == "x86_64-linux" then "x86_64" else "aarch64"; appimagename = "Ghostty-${upstreamVersion}-${arch}.AppImage"; in pkgs.stdenv.mkDerivation { pname = "ghostty"; version = appimageVersion; src = pkgs.fetchurl { url = "https://github.com/psadi/ghostty-appimage/releases/download/${appimageVersion}/${appimagename}"; hash = if system == "x86_64-linux" then "sha256-B7YH8hfsPzpjdXcUTfo3dxj8xNFL8LZnHjEzinnf7M0=" else "sha256-Obn6PfQIsHQn6y4M20tqvWfw22TvoT4jEo181KGzEQs="; }; nativeBuildInputs = [ pkgs.makeWrapper ]; buildInputs = [ pkgs.appimage-run ]; dontUnpack = true; installPhase = '' mkdir -p $out/bin $out/share/applications # We do this so that nix won't try to do it's wrapper stuff needed for nix os cp $src $out/share/${exename} chmod +x $out/share/${exename} cat > $out/share/applications/Ghostty.desktop <