The caddy-with-dns package used a fixed-output derivation with an outputHash that bundled xcaddy source generation and go mod vendor into a single content-addressed blob. This hash broke whenever nixpkgs updated the caddy version, plugin versions changed, or any transitive dependency shifted, causing CI lockfile update jobs to fail. Replaced the xcaddy-based build with a standard Go module structure using buildGoModule. The source files (main.go, go.mod, go.sum) are checked in and the caddy version is pinned in go.mod rather than inherited from nixpkgs, decoupling from flake.lock updates. The package version is extracted from go.mod at eval time to avoid maintaining it separately. Removed the separate caddy-specific CI build step that existed only to catch stale hashes. Added a Renovate post-upgrade task to recompute the vendorHash after Go dependency updates, and added gawk and gnused to the Renovate service path so the post-upgrade sed and awk commands work. Test plan: - Built caddy-with-dns, verified binary version (v2.10.2) and both dns.providers.cloudflare and dns.providers.jakehillion modules - CI
24 lines
592 B
YAML
24 lines
592 B
YAML
name: flake
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags-ignore:
|
|
- '**'
|
|
|
|
jobs:
|
|
flake:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a # v21
|
|
- uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
|
|
- name: lint
|
|
run: |
|
|
nix fmt -- .
|
|
git diff --exit-code
|
|
- name: flake check
|
|
run: nix flake check
|
|
timeout-minutes: 10
|