web: build the Lately macro plugin on linux (unbreak deploy-web) #31
No reviewers
Labels
No labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
key-store/key.store!31
Loading…
Reference in a new issue
No description provided.
Delete branch "lately-macro-plugin-linux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
deploy-webhas been red on every push since at least 08-02:lately-macro-pluginusedstdenvNoCCand cannot build on linux. Five layered fixes (SDKROOT via a cc-bearing stdenv, CC=clang for swift-syntax C shims, explicit clang resource-dir, no fortify hardening, no strip) — each verified against the real failure on the forge;nix build .#web-containernow produces the image.🤖 Generated with Claude Code
deploy-web has failed on every push since at least 2026-08-02: .#web-container -> lately-web-core -> lately-macro-plugin, and the plugin derivation used stdenvNoCC. On linux that leaves four things missing that the darwin build gets from Xcode for free, surfacing one at a time: * "libc not found for x86_64-unknown-linux-gnu" / "missing required module 'SwiftGlibc'": the swift wrapper only synthesizes the glibc SDK root (SDKROOT) when NIX_CC is set, i.e. a stdenv with a C compiler. Use kaiosCoreStdenv, which already encodes that rule. * "gcc: unrecognized command-line option '-target' / '-fblocks'": SwiftPM hands swift-syntax's C shim target to $CC, which the gcc stdenv sets to gcc. Repoint CC/CXX at the toolchain's clang. * "'stddef.h' file not found": that clang is nixpkgs' wrapper, and the gcc stdenv has already set NIX_CC_WRAPPER_FLAGS_SET_*, so the wrapper skips its own cc-cflags -- including -resource-dir. Pass it explicitly, the same value devShells.linux exports as KEYSTORE_SWIFT_CLANG_RESOURCE_DIR. * "ambiguous use of 'read'": nixpkgs hardening injects -D_FORTIFY_SOURCE and glibc's fortified bits/unistd.h declares a second read the Swift clang importer cannot disambiguate. hardeningDisable fortify/fortify3. * nixpkgs' strip hook then trips over the Swift-linked binary ("strip.sh: exit_code: unbound variable"); dontStrip. Verified end to end on the forge: nix build .#web-container now produces the docker image. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>