Repository navigation
Description
Description
0.4.0 consumer field-validation (#639, EXOMA/hyrr) showed that uv sync hard-fails in
ghcr.io/vig-os/devcontainer:0.4.0 for any dependency without a cp314 wheel (pycatima):
the image ships no C/C++ compiler and the baked CPython sysconfig points CC/CXX at a
nix-store path absent from the runtime image (#879). The mechanical half is #879
(sanitize sysconfig so build backends fall back to PATH discovery). This issue is the
contract half: document, as official policy, where native builds belong so
consumers with native deps (Geant4, ROOT, OCCT, catima, f2py) have a supported target
instead of waiting for a fatter base image.
The contract already half-exists — docs/MIGRATION.md § "Adding tools the image does
not ship" states the image is deliberately minimal and points at
vigos.lib.mkProjectShell { extraPackages = [ … ]; } — but it is written around CLI
tools (Rust example) and says nothing about native Python sdist builds, which is
where consumers actually hit the wall. Formalize:
- The tiered contract, stated explicitly:
- Pure-Python / wheel-only repos — image works as-is; nothing to do.
- Repos with native deps (preferred path) — provide the toolchain via the project
flake:mkProjectShell { extraPackages = [ pkgs.stdenv.cc pkgs.cmake pkgs.pkg-config … ]; }.
Insidenix develop/direnv the stdenv exports workingCC/CXX, so
scikit-build-core/setuptools/meson-python find a real compiler regardless of the
baked sysconfig. This is the path EXOMA/talys already validated (T4.1 — Publish-cutover to the Nix image (GATED) #639 consumer 2/2). - Devcontainer-mode repos with native deps (middle path — document it!) — no full
direnv migration required: the image ships Nix with flakes enabled, so inside the
containernix develop -c just sync(against the project flake) or ad-hoc
nix shell nixpkgs#gcc nixpkgs#cmake -c uv syncworks today. Name this explicitly
as the interim answer for repos like hyrr while the cp314 wheel ecosystem matures.
- A worked example with heavyweight scientific deps — a devshell adding
pkgs.geant4/pkgs.rootalongside the compiler, showing that a bare compiler in
the base image would not have sufficed (native builds need headers + libs + build
config, which only a pinned flake provides reproducibly). - What we will NOT do — bake gcc/cmake into the published image (breaks the
minimal-image stance, inflates every consumer, and still fails for anything needing
third-party headers/libs). Record the reasoning so the request doesn't resurface
per-consumer. - CI boundary — running consumer CI inside the project devshell (so the contract
holds in CI, not just locally) is the nix-direct CI lane, tracked in [FEATURE] Nix-direct (direnv-mode) CI lane + version-skew hardening for shipped workflows #854; this issue
only cross-references it. Until [FEATURE] Nix-direct (direnv-mode) CI lane + version-skew hardening for shipped workflows #854 lands, devcontainer-mode CI can use the
in-containernix develop -cform from (1c).
Documentation Type
Add new documentation
Target Files
docs/MIGRATION.md— extend § "Adding tools the image does not ship" into the
explicit native-build contract (tiers, worked Geant4 example, in-container middle
path, non-goals). Direct file, not template-generated.docs/NIX.md— cross-reference from the flake-architecture side if needed.
Related Code Changes
- fix(image): no C/C++ toolchain — uv cannot build sdists for deps without cp314 wheels (CMake reads absent nix-store compiler from sysconfig) #879 — sysconfig sanitize (graceful PATH fallback in-image); this issue documents the
contract that fix degrades into. - [FEATURE] Nix-direct (direnv-mode) CI lane + version-skew hardening for shipped workflows #854 — nix-direct (direnv-mode) CI lane; the CI enforcement of this contract lives
there, not here. - T4.1 — Publish-cutover to the Nix image (GATED) #639 — field evidence: talys (direnv-mode, native toolchain from flake) green;
hyrr (devcontainer-mode, pycatima sdist) blocked.
Acceptance Criteria
- MIGRATION.md states the tiered contract (wheel-only / flake-provided toolchain /
in-containernix developmiddle path) with copy-pasteable snippets - Worked example covering a compiler-only case (
stdenv.cc+cmake) and a
heavyweight case (pkgs.geant4) - Explicit non-goal recorded: no C/C++ toolchain in the base image, with rationale
- Cross-links to fix(image): no C/C++ toolchain — uv cannot build sdists for deps without cp314 wheels (CMake reads absent nix-store compiler from sysconfig) #879 (mechanics) and [FEATURE] Nix-direct (direnv-mode) CI lane + version-skew hardening for shipped workflows #854 (CI lane) in place
Changelog Category
Changed
Additional Context
Field evidence and discussion: #639 (Phase-B downstream validation comments).
mkProjectShell is defined in flake.nix and already accepts
extraPackages; pkgs.geant4 and pkgs.root exist in nixpkgs, so the worked example
is real, not aspirational.
Activity
docs(migration): formalize the native-build contract (#888)
docs: retire the documented Debian fallback path (T4.4) (#889)
fix(nix): sanitize image sysconfig compiler records to generic cc/c++ (…
c-vigo commentedon Jul 8, 2026
Implemented in 0.4.1 (released 2026-07-08) — see the
## [0.4.1]CHANGELOG entry. Closing as completed.chore: release 0.4.1 (#202)
chore: release 0.4.1 (#898)