3 Commits

Author SHA1 Message Date
Christopher Harrison
687bbd1902 chickenPackages_6.chickenEggs: fix and mark the Darwin failures
Building both egg sets on aarch64-darwin for the first time turns up four
CHICKEN 6 failures, three of them cases where a Darwin bundle has to resolve
every symbol at link time while a Linux shared object may leave them to the
loader.

bvconv binds to iconv, which is part of glibc but a library of its own on
Darwin.

constructive-solid-geometry names every OpenCASCADE library it uses except
TKBO, which defines the BRepAlgoAPI_* boolean operations it calls.  On Linux
that library arrives anyway, as a transitive dependency of TKBool, so the egg
both links and loads; the link option is added unconditionally, as the
dependency is real on either platform.

nutils calls mempcpy, a GNU extension that Darwin's libc does not provide, so
it is marked broken there, as is tkgui, which depends on it.

The three CHICKEN 5 eggs that fail on aarch64-darwin -- fusion-arrays,
hypergiant and libyaml -- fail identically at the base of this branch and are
left alone.

Also records why neither release runs its test suite on Darwin, which was
until now an unexplained condition inherited from the CHICKEN 5 expression:
CHICKEN 5's runtests.sh drives the compiler through /usr/bin/env, which the
sandbox denies, and CHICKEN 6's csc tests run binaries whose install name
install_name_tool has already rewritten to a $out that does not exist until
the install phase.

Assisted-by: Claude Code (claude-opus-5[1m])
2026-09-10 19:20:46 +01:00
Christopher Harrison
48dbd6c931 chickenPackages.eggDerivation: drop the egg repository from the wrapper PATH
CHICKEN_REPOSITORY_PATH is a search path of egg repository directories, which
hold compiled modules and .egg-info files, not executables, so prefixing PATH
with it never made a program findable.  It also bakes the build time
repository search path, i.e. the egg's own build inputs, into the wrapper of
every installed program.

Reported by @DerGuteMoritz in review, who verified it with the csm egg; csm
still runs with the prefix removed, on both CHICKEN 5 and 6.

Assisted-by: Claude Code (claude-opus-5[1m])
2026-09-10 19:20:46 +01:00
Christopher Harrison
2311b62b34 chickenPackages: build CHICKEN 5 and 6 from shared expressions
The CHICKEN 6 set was added as a copy of the CHICKEN 5 one, following the
existing 4-vs-5 split, but the two releases only really differ in the
compiler's version, its egg binary version, and the egg channel their eggs
come from.  Everything else -- the compiler derivation, the egg builder, the
scope that ties them together, the egg metadata reader and the script that
generates the egg set -- now lives in common/, and each release directory
keeps only what is genuinely per release: deps.toml, overrides.nix, and the
arguments in default.nix.

CHICKEN 4 is left alone.  It predates deps.toml and update.sh, it patches and
regenerates the compiler's own sources, and it is no longer supported
upstream, so it has little to share.

Aligning the two expressions changes the CHICKEN 5 compiler derivation:

  - The bootstrap stage is gone.  Building a throwaway compiler and rebuilding
    with it is a leftover of the CHICKEN 4 expression, which patches Scheme
    sources and therefore needs a working CHICKEN to regenerate the C files.
    CHICKEN 5 needs no patch and its tarball ships the generated C files.

  - checkTarget is set, so the test suite now actually runs.  The generic
    check phase probes for a target with a bare `make`, which fails here
    because PLATFORM is only given in makeFlags, so the suite was silently
    skipped.  It passes: 76 sections, in 12 minutes, with the two tests the
    expression disables in postPatch still disabled.

  - dontConfigure is set.  CHICKEN 5 has no configure script at all, so this
    is a no-op for it; it is CHICKEN 6, whose hand-written configure rejects
    the options stdenv passes, that needs it.

  - The setup hook is generated from the binary version with replaceVars,
    rather than kept as one copy per release.

The egg builder gains the CHICKEN 6 egg cache export, which is harmless for
CHICKEN 5, and loses an unused binding.  As @DerGuteMoritz notes in review,
the export only needs doing once: the install phase runs in the same shell as
the build phase.

Every CHICKEN 5 egg therefore rebuilds, with no expected change to what they
contain.

Sharing the expression also shares its meta, so Xophmeister, who added the
CHICKEN 6 set, is now listed as a maintainer of CHICKEN 5 as well.

Assisted-by: Claude Code (claude-opus-5[1m])
2026-09-10 19:20:46 +01:00