-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ghostty: init at 1.0.0 #368404
ghostty: init at 1.0.0 #368404
Conversation
Also needs to be reformatted w/ nixfmt-rfc-style (the nixpkgs-vet CI failure is a zig2nix bug that we can't really control) |
66c24b2
to
ace3254
Compare
downloadPage = "https://ghostty.org/download"; | ||
|
||
license = lib.licenses.mit; | ||
platforms = lib.platforms.linux; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platforms = lib.platforms.linux; | |
platforms = lib.platforms.linux ++ lib.platforms.darwin; |
If it doesn’t build on macOS, it would be better to set broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's less that it doesn't build on Darwin and more it can't build on Darwin since xcodebuild has to be invoked outside of the Nix build environment. I think we should just repackage the .dmg for now until we somehow figure out a way to compile it with Nix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m curious why that’s the case
And whether that’s been tested since the darwin SDK refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately neither I nor @jcollie have Darwin setups to test with, so either someone comes forward with a better idea, or we have to stick with a repackaging for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that anyone has tried since the darwin refactor. I won't be doing that work because I don't have a macOS machine to test on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that anyone has tried since the darwin refactor. I won't be doing that work because I don't have a macOS machine to test on.
I could test, I willing be happy to help to support darwin. I have a m2 macbook which means I can cross compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe discussions on this topic are happening on matrix https://matrix.to/#/#macos:nixos.org (though more focused on getting the build tooling chain working for source builds). I'm not sure where work to package the DMG is happening/being discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long story short is that building the Mac app from source appears to be blocked on getting our Swift situation into a better place (if anyone has ideas on how to do a source build with our current Swift setup, please chime in in that matrix room).
I haven't seen anything about packaging the DMG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of a drive by comment but: for my setup and https://github.com/kovidgoyal/kitty I eventually gave up and used the dmg directly; some features (like OS notifications) require signed executables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the macOS discussion for follow-up PRs or issues. @jcollie has already mentioned that they won't be the one doing any sort of macOS support.
Please add the platforms though and set badPlatforms or broken.
ace3254
to
df650f7
Compare
9da662e
to
ee671bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs mister @ofborg to be happy
Any chance we can also get Ghostty's terminfo file added to the NixOS terminfo database, or does that belong in a separate PR? |
That should be handled already, there's a |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this to nixos/tests/terminal-emulators.nix
and add the resulting test to passthru.tests
?
Would it be possible to include a patch so that ghostty runs without io_uring (which is disabled on linux-hardened)?
https://discord.com/channels/1005603569187160125/1312996817264181350 (sorry) No idea if this causes any visible performance issues |
That's the sort of thing that you can patch with |
The runtime closure includes all the zig sources:
Would be nice if we could get rid of those references. There seems to be a reference in the binary to Here is the fix, feel free to squash into your init commit: jcollie/nixpkgs@ghostty-init-1.0.0...fpletz:nixpkgs:pr/368404/remove-zig-src-refs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may also be nice to pull glslang
, spriv-cross
, and simdutf
as well since we have them in Nixpkgs: https://github.com/ghostty-org/ghostty/blob/35b9ceee2116331b83c0c86269394e2545070b0f/build.zig#L271-L280
6573bb3
to
cd9116b
Compare
Formatting fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
Let's merge this PR now. If any issue shows up, we can surely fix it in a follow up PR.
cd9116b
to
e984149
Compare
e984149
to
10fadb5
Compare
To make this more explicit this is a quote from mitchell below, and it will continue to be a developer only runtime
|
10fadb5
to
18caadc
Compare
OK, I believe that I have addressed all of the requested changes at this point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do this
@ofborg build ghostty |
18caadc
to
bbd2dd0
Compare
bbd2dd0
to
d9a2008
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ nix-build -A ghostty --eval-system x86_64-linux
/nix/store/581anvgyq96jsams23xz85h5brr04jaq-ghostty-1.0.0
$ nix-build -A ghostty --eval-system aarch64-linux
/nix/store/2xdmahyczwsaabivpqzz30smfjvimc4n-ghostty-1.0.0
Thanks for your work here @jcollie, as well as the many reviewers! 🥳 I will be making a follow up PR to address some of the other suggestions here, hopefully followed by a backport to 24.05 and Darwin support And obligatory mention: we ended up becoming the second most upvoted PR in Nixpkgs |
I will be making a pr that hopefully adds darwin support, but one of the things that need to be done first is swift 6 and 5.10 in nixpkgs then it will be possible. |
* maintainers: add jcollie * ghostty: init at 1.0.0 (cherry picked from commit 3c6c692)
* maintainers: add jcollie * ghostty: init at 1.0.0
Adding Ghostty:
Ghostty is a terminal emulator that differentiates itself by being fast, feature-rich, and native. While there are many excellent terminal emulators available, they all force you to choose between speed, features, or native UIs. Ghostty provides all three.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.