Skip to content

Commit

Permalink
nix: use zig2nix to manage nix cache/deps
Browse files Browse the repository at this point in the history
This brings the internal package more in line with how the nixpkgs
package is built. It also handles recursive dependencies better than the
current system.
  • Loading branch information
jcollie committed Jan 30, 2025
1 parent adf4066 commit 603d5f3
Show file tree
Hide file tree
Showing 12 changed files with 539 additions and 199 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ jobs:
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
useDaemon: false # sometimes fails on short jobs
- name: Check Zig cache hash
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh
- name: Check Zig cache
run: nix develop -c ./nix/build-support/check-zig-cache.sh
8 changes: 4 additions & 4 deletions .github/workflows/update-colorschemes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:
run: |
# Only proceed if build.zig.zon has changed
if ! git diff --exit-code build.zig.zon; then
nix develop -c ./nix/build-support/check-zig-cache-hash.sh --update
nix develop -c ./nix/build-support/check-zig-cache-hash.sh
nix develop -c ./nix/build-support/check-zig-cache.sh --update
nix develop -c ./nix/build-support/check-zig-cache.sh
fi
# Verify the build still works. We choose an arbitrary build type
# as a canary instead of testing all build types.
- name: Test Build
run: nix develop -c zig build -Dapp-runtime=gtk -Dgtk-adwaita=true
run: nix build .#ghostty

- name: Create pull request
uses: peter-evans/create-pull-request@v7
Expand All @@ -66,7 +66,7 @@ jobs:
commit-message: "deps: Update iTerm2 color schemes"
add-paths: |
build.zig.zon
nix/zigCacheHash.nix
build.zig.zon.nix
body: |
Upstream revision: https://github.com/mbadolato/iTerm2-Color-Schemes/tree/${{ steps.zig_fetch.outputs.upstream_rev }}
labels: dependencies
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ glad.zip
/Box_test.ppm
/Box_test_diff.ppm
/ghostty.qcow2
/build.zig.zon2json-lock
Loading

0 comments on commit 603d5f3

Please sign in to comment.