Skip to content

fix(nix): include internal/web/assets in flake fileset for go:embed#142

Merged
asphaltbuffet merged 1 commit into
mainfrom
fix-nix-embed-assets
May 24, 2026
Merged

fix(nix): include internal/web/assets in flake fileset for go:embed#142
asphaltbuffet merged 1 commit into
mainfrom
fix-nix-embed-assets

Conversation

@asphaltbuffet
Copy link
Copy Markdown
Owner

@asphaltbuffet asphaltbuffet commented May 24, 2026

Summary

  • Add ./internal/web/assets to the lib.fileset.unions list in flake.nix
  • Update CLAUDE.md repository layout to reflect current package structure

Root Cause

The Nix build uses an allowlist fileset (lib.fileset.unions) that only included .go and .sql files. The internal/web/assets directory — containing HTML templates, htmx.min.js, app.css, and VERSION — was absent from the build sandbox, causing the //go:embed assets directive in routes.go to fail:

internal/web/routes.go:9:12: pattern assets: no matching files found

Fix

+              ./internal/web/assets

This is the same pattern already used for SQL migrations — the entire directory is included rather than a file-extension filter, since the assets include .html, .js, .css, and extension-less files.

Test Plan

  • nix build succeeds
  • mise run test passes (547 tests)

The fileset union only included .go and .sql files, so the embedded
assets directory (HTML templates, htmx.min.js, app.css, VERSION) was
absent from the Nix build sandbox. The go:embed directive in routes.go
then failed with 'pattern assets: no matching files found'.

Also update CLAUDE.md repository layout to reflect current package
structure (app, store, inventory, eventbus, web) and remove stale
references to the deleted database/ and migrate/ packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@asphaltbuffet asphaltbuffet merged commit a298cab into main May 24, 2026
4 checks passed
@asphaltbuffet asphaltbuffet deleted the fix-nix-embed-assets branch May 24, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant