Commit Graph

258 Commits (main)

Author SHA1 Message Date
Jeffrey C. Ollie a69d9507b3
build ghostty nix package with ReleaseSafe 2024-03-22 20:28:06 -07:00
Mitchell Hashimoto 32c5e7a9d4
update libxev for windows stuff 2024-03-22 11:25:27 -07:00
Mitchell Hashimoto 877173067a
nix: update hash 2024-03-22 11:17:59 -07:00
Mitchell Hashimoto 61424a875c
nix: update cache hash 2024-03-13 13:40:42 -07:00
Mitchell Hashimoto b48d24a546
update zig 2024-03-13 09:14:12 -07:00
Mitchell Hashimoto 4ecb6307b7
update zig 2024-03-09 15:59:45 -08:00
Jeffrey C. Ollie 160f05395b
add hyperfine to the nix development environment 2024-02-07 12:55:37 -06:00
Mitchell Hashimoto 49f9059e0c
nix: update cache hash 2024-02-05 21:22:28 -08:00
Mitchell Hashimoto 31d5785105
simd: basic ISA detection, boilerplate 2024-02-05 21:22:03 -08:00
Andrew Kelley 3a84f77782
make mach_glfw a lazy dependency
Prevents it from being fetched unless it is actually needed.
2024-02-05 19:01:36 -08:00
Mitchell Hashimoto cb1a06181f
nix: update cache 2024-02-04 18:41:40 -08:00
Lin Xianyi 6a720564b6 nix: Add meta.mainProgram 2024-01-28 10:22:38 +08:00
Jeffrey C. Ollie ef09fa89b0
Generate documenation (manpages, etc.) from help strings. 2024-01-21 15:07:22 -06:00
Mitchell Hashimoto d32667e46c
nix: only linux is supported for the package 2024-01-20 14:23:05 -08:00
Mitchell Hashimoto 87933cc631
nix: update hash 2024-01-16 11:28:24 -08:00
Mitchell Hashimoto 468ba9ef86
nix: update hash 2024-01-13 21:39:35 -08:00
Mitchell Hashimoto 9566e71767
nix: update hash 2024-01-13 19:44:14 -08:00
Mitchell Hashimoto ac0994e3de
nix: update build hash 2024-01-13 15:31:04 -08:00
Mitchell Hashimoto 12db2bc962
nix: update package hash 2024-01-09 22:25:47 -08:00
Mitchell Hashimoto ad0db1d2ae
nix: update hash 2024-01-07 15:30:56 -08:00
Chris Marchesi 477a79087b
nix: update nixpkgs-zig-0-12 input, also cache hash
This updates zig_0_12 to be built off of 0.12.0-dev.2059+42389cb9c.

Additionally, we update the cache hash.
2024-01-07 13:56:07 -08:00
Mitchell Hashimoto 8db0697b5d
nix: update hash 2024-01-07 12:18:11 -08:00
Jeffrey C. Ollie 6626c315d7
In some cases, 'self' would not be passed to the package. It's not necessary so remove it. 2024-01-06 16:30:40 -06:00
Jeffrey C. Ollie f09901f236
Include '-nix' in the version string to distinguish Nix builds. 2024-01-06 00:08:30 -06:00
Jeffrey C. Ollie 0200f79554
Include the git commit hash in the Nix package. 2024-01-05 23:44:53 -06:00
Chris Marchesi 5704baf4e6
nix: add libX11 to RUNPATH
This adds libX11 to the (wrapped) binary RUNPATH in the Nix package
fixupPhase, to ensure that the dlopen we are doing of it now in #1193
functions correctly.

Note that we patch ".ghostty-wrapped" here, as this is now the main
binary after #1104.
2024-01-01 21:40:43 -08:00
Jeffrey C. Ollie a995b6dbb0
fix nix package and add ci test for nix package build 2023-12-22 13:43:06 -06:00
Mitchell Hashimoto d796d1259b
nix: only add shellhook on linux 2023-12-16 14:14:53 -08:00
Denys Pavlov 212a95866a nix: fix GTK icons for debug builds
Set `XDG_DATA_DIRS` in `nix develop` shell to include default Gnome
icon sets and gsettings schemas.

Sourced from [nixos wiki](https://nixos.wiki/wiki/Development_environment_with_nix-shell#No_GSettings_schemas_are_installed_on_the_system).
2023-12-16 13:15:03 -05:00
Denys Pavlov 82f102224f nix: use wrapGAppsHook4 to package ghostty
`wrapGAppsHook4` is recommended by nixpkgs for packaging GTK4
applications.[1] It ensures `XDG_DATA_DIRS` includes the nescessary
icons and gsettings schemas.
2023-12-16 13:04:54 -05:00
Jeffrey C. Ollie c4ed1f1b80
Use Alejandra to format Nix modules. 2023-12-12 11:38:39 -06:00
Jeffrey C. Ollie bba8583a21
Add "terminfo" and "shell_integration" subpackages to the Nix package so that the Ghostty
terminfo and shell integration files can be installed on a headless server without copying all
of Ghostty to the server. Implementation liberally cribbed from the Kitty Nix package.
2023-12-12 09:30:21 -06:00
RGBCube b3082e3925
Use camelCase for all nix files 2023-12-08 16:53:02 +03:00
RGBCube 0e941896fa
Compile wraptest with O3, run hooks 2023-12-08 16:53:02 +03:00
RGBCube 5846d991e9
Add garnix cache and clean up all nix code 2023-12-08 16:52:58 +03:00
Mitchell Hashimoto 2d8620e47e
nix: update cache hash 2023-11-30 14:07:14 -08:00
Mitchell Hashimoto 9326e21339
nix: update cache hash 2023-11-29 15:30:46 -08:00
Mitchell Hashimoto b85174c7ac
build: add oniguruma 2023-11-29 15:29:43 -08:00
Mitchell Hashimoto 7a9f979646
nix: update zig cache hash 2023-11-28 08:17:47 -08:00
Chris Marchesi c3b44020f4
nix: add GitHub Actions workflow
This adds a nix workflow that does the following:

* Checks to see if the Zig cache fixed derivation needs its hash
  updated. It does this by downloading a new cache, calculating the
  hash, and comparing it against what has already been set. If the hash
  is different, the workflow fails.
* Runs a Nix build if the hash is OK, testing the build of
  packages.ghostty (using "nix build .")

The cache workflow we use in the build job comes from:
  https://github.com/DeterminateSystems/magic-nix-cache-action/

Fixes #937.
2023-11-24 17:07:55 -08:00
Chris Marchesi 01663c8b29
nix: update zigCacheHash, mention that building pkg requires src
This updates the zigCacheHash and just adds a note mentioning that using
the package will require you to rebuild LLVM 17 and Zig, and directs
people to use the devShell until this is resolved.

This is likely good advice for most people until such time that both are
in nixpkgs (or at least LLVM 17 as it's by far the bigger culprit here).
2023-11-21 15:59:24 -08:00
Chris Marchesi 07e16eb7c1
nix: update zigCacheHash
Just a bump to zigCacheHash to address dependency updates.
2023-11-20 23:50:31 -08:00
Chris Marchesi fa9a6eb88d
nix: use -Doptimize=ReleaseFast
I figured out how to override the hook default build flags so that we
can set -Doptimize=ReleaseFast. :)

There's a long conversation that's gone on about this in nixpkgs, but
it's fairly well summed up here:
https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653

I'd imagine we will want to adopt whatever is eventually done - after
this, we can remove the override and rely on more first-class
configuration, or logic in build.zig.
2023-11-20 21:20:38 -08:00
Chris Marchesi 2671215211
nix: fix package build
This fixes the Nix *package* build (read: not devShell, which is not
touched) so that it builds, and also conforms to what is generally seen
for a Zig project in nixpkgs.

The highlights:

* We use a Zig 0.12 derivation that I constructed from the Zig 0.11
  derivation, in addition to LLVM 17 updates found in
  NixOS/nixpkgs#258614. This specifically includes the patches that
  address ziglang/zig#15898, and also allows us to take advantage of the
  build hooks included in the Zig toolchain there.

* We pre-download the cache using "zig build --fetch" and a fixed-output
  derivation. This is similar to how the Go builders work in nixpkgs and
  I could see Zig ultimately going in a similar path, given that the
  fetcher part of the build system seems to be shaping up to having a Go
  module system-style DX (mind you, this is a naive opinion right now).

* Finally, cleaned up the derivation so that there's no special fixups
  happening outside of what is defined in the basic nixpkgs workflow.
  This is similar to other Zig projects I looked at (notably River) that
  seem to just include their dependencies in buildInputs and call it a
  day.

One specific change that is worth noting is that this changes the build
mode from ReleaseFast to ReleaseSafe - this is the current default
within the Zig build hook in nixpkgs. If we need ReleaseFast, we'll have
to override this.
2023-11-19 14:21:34 -08:00
Hanna 2d7e2c8345
Integrate libadwaita for the gtk backend (#792)
* When using gtk as the backend, link libadwaita

* Update c.zig

* Use libadwaita's theme manager for gtk

* update the documentation for window-theme

* build: add libadwaita to the nix devshell

* forgot to properly import libadwaita

* apprt/gtk: adwaita style change

---------

Co-authored-by: Mitchell Hashimoto <mitchell.hashimoto@gmail.com>
2023-11-02 21:29:29 -07:00
Mitchell Hashimoto e3a58526ce
fix dynamic build 2023-10-01 17:42:18 -07:00
Mitchell Hashimoto 779611c04b
nix: install prettier, also ignore zig-cache/out 2023-09-28 15:16:12 -07:00
Mitchell Hashimoto 90b5fdeede
ci: don't run gtk tests in CI 2023-09-18 15:46:57 -07:00
Thorsten Ball d86de34cf1 nix: add latest version of `zls` to flake.nix
I know not everybody uses ZLS (or LSPs in general) but I think it's very
useful and it's very handy to have it in the `flake.nix` to keep it up
to date with the `zig` version.

As with a lot of my PRs in this project, please consider the following a
disclaimer: I have 0 clue what I'm doing here and if there's a better
way to do what I'm trying to do, let me know!
2023-09-09 15:18:05 +02:00
Mitchell Hashimoto 0bdd73797e
Fix rendering issues with bash shell integration (#301)
* shell-integration/bash: we need to wrap escape sequences in brackets

* nix: install bashInteractive on Linux
2023-08-17 22:42:26 -07:00
Mitchell Hashimoto c2137360f4
update nix to 23.05 (#250)
* update nix to 23.05

* nix: do not install gdb on macos
2023-08-08 09:01:47 -07:00
Kevin Hovsäter 22b8173164 Fix typos 2023-08-08 14:27:34 +02:00
Mitchell Hashimoto c7865f0aad
nix: remove unused libs 2023-08-07 10:55:56 -07:00
Mitchell Hashimoto d356d5ea38
build: add libxml2/libbuid for fontconfig dynamic link for CI 2023-08-07 10:33:00 -07:00
Mitchell Hashimoto 68b57f1001
nix: update to python3 2023-07-03 17:15:16 -07:00
Mitchell Hashimoto c9f486be9b
Revert "update nix to 23.05"
This reverts commit fe65764832.
2023-07-03 14:51:08 -07:00
Mitchell Hashimoto fe65764832
update nix to 23.05 2023-07-03 14:36:46 -07:00
Mitchell Hashimoto 3a28ab1e8a
nix: add ncurses so we have access to tic, infocmp, etc. 2023-06-24 09:52:32 -07:00
Mitchell Hashimoto d114f95165
clean up some of the nix package building 2023-03-13 10:12:32 -07:00
Mitchell Hashimoto e227f4d5ef
nix: flatpak stuff should go into linux section 2023-02-26 08:45:24 -08:00
Mitchell Hashimoto 31540c24e7
nix: need debugedit for flatpak-builder 2023-02-25 19:39:33 -08:00
Mitchell Hashimoto 3345c2bb82
nix: add flatpak-builder 2023-02-25 16:50:06 -08:00
Mitchell Hashimoto edb926d434
nix: remove dpkg 2023-02-25 15:16:32 -08:00
Mitchell Hashimoto f217cd24b9
fpm build deb 2023-02-25 14:57:48 -08:00
Mitchell Hashimoto f268f3955e
init gtk app 2023-02-24 07:58:29 -08:00
Mitchell Hashimoto 48c9c65915
add app runtime option, add gtk backend 2023-02-24 07:58:29 -08:00
Mitchell Hashimoto 7d626326de
nix: fix darwin devshell 2023-02-12 19:29:26 -08:00
Mitchell Hashimoto 1840829e9e
add node for web stuff 2022-12-03 21:34:14 -08:00
Mitchell Hashimoto 894d36f28a
build: support for dynamic linking pixman 2022-11-24 10:21:27 -08:00
Mitchell Hashimoto 2d3126ffb7
release-tip workflow (wip) 2022-11-17 11:24:12 -08:00
Mitchell Hashimoto cf14ea506f
update zig 2022-10-24 14:35:42 -07:00
Mitchell Hashimoto 8decfa6452
I think this gets us on master zig... 2022-10-13 11:31:02 -07:00
Mitchell Hashimoto 699da6fcfe
update mach 2022-10-13 11:03:23 -07:00
Mitchell Hashimoto 51d70fc74e
reproduced issue for upgrade comment 2022-09-23 13:37:20 -07:00
Mitchell Hashimoto 72105fc6cd
update to the latest stage2 compiler we can 2022-09-23 12:08:06 -07:00
Mitchell Hashimoto d422d1ee78
pkg/fontconfig: starting, not working 2022-09-13 13:53:20 -07:00
Mitchell Hashimoto d7d372124b
update to stage3 zig with -fstage1 2022-09-08 13:46:05 -07:00
Mitchell Hashimoto 621b067e83
update overlay but we still can't use master 2022-08-31 19:58:44 -07:00
Mitchell Hashimoto 367aba62c4
Add harfbuzz build (not used yet) 2022-08-28 10:09:39 -07:00
Mitchell Hashimoto 8e1e8cfc51
pin new zig-overlay repo 2022-08-23 10:23:02 -07:00
Mitchell Hashimoto ecf8353c74
support dynamic linking (not default) test in GH actions 2022-08-20 15:21:24 -07:00
Mitchell Hashimoto e83262e48e
nix: remove libpng 2022-08-20 10:37:39 -07:00
Mitchell Hashimoto 5d27fd55e9
temp: add libpng to nix 2022-08-20 10:37:06 -07:00
Mitchell Hashimoto 2457454b07
test wasm of the term package 2022-08-17 13:57:21 -07:00
Mitchell Hashimoto ead6e5a435
src/terminal can build into a minimal wasm library, I think 2022-08-17 12:25:53 -07:00
Mitchell Hashimoto d614da2435
make dev/install to add a dev install 2022-07-31 16:11:01 -07:00
Mitchell Hashimoto 9779b565bf
nix: add other X11 deps 2022-07-26 15:02:03 -07:00
Mitchell Hashimoto fc611ec28b
nix: update the package to set proper rpath 2022-07-26 14:39:40 -07:00
Mitchell Hashimoto 2be6de7ebd
nix: we have a package that builds, but doesn't run 2022-07-26 12:04:51 -07:00
Mitchell Hashimoto 702f54a6fa
first attempt at a derivation 2022-07-26 11:38:54 -07:00
Mitchell Hashimoto 473f749f00
nix: add wraptest 2022-07-25 08:18:35 -07:00
Mitchell Hashimoto f11c82853f
test: run-all runs in parallel 2022-07-24 16:47:47 -07:00
Mitchell Hashimoto 46db4623bc
OSC 133;C 2022-06-21 15:50:44 -07:00
Mitchell Hashimoto 989d23e9fc
update deps and fixes for NixOS 22.05 2022-06-01 18:00:37 -07:00
Mitchell Hashimoto 700124ea8e
use nix-direnv 2022-05-04 09:41:08 -07:00
Mitchell Hashimoto fbe9c10944
add tracy and update Zig 2022-04-29 08:33:10 -07:00
Mitchell Hashimoto c6f1be3343
move from epoxy to glad 2022-04-04 14:35:19 -07:00
Mitchell Hashimoto 670af17a1b
getting closer to dumb font rendering 2022-04-03 22:04:42 -07:00
Mitchell Hashimoto 3cb5dae9d8
fontconfig example 2022-04-03 20:08:29 -07:00
Mitchell Hashimoto dc3d2d65d0
draw a triangle with opengl 2022-04-01 14:25:55 -07:00
Mitchell Hashimoto 387b0ff4a8
setup opengl 2022-04-01 10:49:54 -07:00
Mitchell Hashimoto a78e1894f8
minimal raylib window 2022-03-31 17:27:07 -07:00
Mitchell Hashimoto 83e5252c52
basics of setting up webgpu are up 2022-03-30 21:07:21 -07:00
Mitchell Hashimoto 81982a5d99
nix 2022-03-30 14:24:26 -07:00
Mitchell Hashimoto 112b13ae4d
build mach-glfw 2022-03-30 11:38:06 -07:00
Mitchell Hashimoto b8cee0a39e
initial glfw stuff working 2022-03-29 10:38:10 -07:00
Mitchell Hashimoto ca11c63ca9
nix: add libX11 2022-03-29 09:28:59 -07:00
Mitchell Hashimoto f8b0000444
Initial 2022-03-29 09:06:39 -07:00