initial commit
This commit is contained in:
commit
c52656033c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
result
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2025 Emil Lerch
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Nix flake for Ghostty AppImage
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Uses [Ghostty app image](https://github.com/psadi/ghostty-appimage)
|
||||||
|
|
||||||
|
I do not believe this flake will work on NixOS proper. Appimages use a wrapper
|
||||||
|
there that do not work outside of NixOS.
|
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1738142207,
|
||||||
|
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
58
flake.nix
Normal file
58
flake.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
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 <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Ghostty
|
||||||
|
Exec=$out/bin/${exename}
|
||||||
|
Type=Application
|
||||||
|
Categories=Utility;
|
||||||
|
Terminal=false;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
ln -s "$out/share/${exename}" "$out/bin/${exename}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
packages = {
|
||||||
|
x86_64-linux.default = mkGhostty "x86_64-linux";
|
||||||
|
aarch64-linux.default = mkGhostty "aarch64-linux";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user