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])
Regenerated with update.sh. Upstream has ported 61 more eggs to CHICKEN 6
since the set was first written, taking it from 216 to 277, and released new
versions of 19 of the ones already in it. Nothing was dropped.
srfi-4 rejoins the dependencies that are stripped because they are part of
the compiler: it is core in CHICKEN 6, like r7rs, and npdiff is the first
egg in the set to declare a dependency on it.
Two of the three eggs marked broken now build. transducers is unchanged at
0.10.0, but srfi-253, the only dependency of it to have moved, went from
0.2.0 to 0.3.1, and its module now resolves; generalized-arrays follows, as
it only failed because it depends on transducers.
feathers stays broken, but for a corrected reason: its tarball does have
sources. The egg is implemented in Tcl and its .egg declares no source for
the program it builds, so chicken-install falls back to a feathers.scm that
is not there, which only fails because the egg is built and installed by two
separate chicken-install runs. Diagnosed by @DerGuteMoritz in review, who
reports that upstream intends to deprecate the egg, so it is left alone.
Of the newly ported eggs, only ezxdisp needs an override, for the X11
headers it binds to. Unlike the CHICKEN 5 egg, this version builds without
any extra compiler flags.
276 of the 277 eggs build.
Assisted-by: Claude Code (claude-opus-5[1m])
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])
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])
Derived from building the whole set: 213 of the 216 eggs now build, and the
three that do not are marked broken with a reason.
Only 10 of the 96 entries in the CHICKEN 5 overrides file are needed, as most
of the eggs they refer to have not been ported to CHICKEN 6 yet, and one of
them needs a different fix: svn-client's build script no longer hardcodes
/usr/include/subversion-1, so it just needs pkg-config and the libraries,
rather than the substitution the CHICKEN 5 override performs.
The helpers are carried over unchanged, minus the ones nothing uses yet, so
the two files stay recognisably the same.
Assisted-by: Claude Code (claude-opus-5[1m])
Generated from upstream's eggs-6-latest tree with update.sh, the same way
as the CHICKEN 5 set; 216 eggs have been ported to CHICKEN 6 so far,
against 621 for CHICKEN 5.
r7rs is no longer an egg in CHICKEN 6, so it joins the dependencies that
are stripped because they are part of the compiler.
The license translation table gains "bsd-2", which four eggs in the
CHICKEN 6 channel use as a spelling of BSD-2-Clause. Only the abbrev egg
is left with a license Nixpkgs has no attribute for, the Open Works
License, which stays a plain string.
Assisted-by: Claude Code (claude-opus-5[1m])
Same builder as the CHICKEN 5 one: chicken-install can build and install
an egg offline from an unpacked tarball, and the workaround for
https://bugs.call-cc.org/ticket/1855 is still needed, as 6.0.0 installs
eggs whose .egg carries no version property without one.
Unlike CHICKEN 5, chicken-install now takes a lock in its egg cache even
when building an egg from the current directory, so the cache has to be
pointed at a writable location for the build to work in the sandbox.
overrides.nix is empty for now; entries follow once the whole egg set has
been built.
Assisted-by: Claude Code (claude-opus-5[1m])
CHICKEN 6.0.0 is the first major release since 5.x. It bumps the egg
binary version from 11 to 12, so it gets its own package set rather than
replacing chickenPackages_5; the unversioned attributes still point at
CHICKEN 5.
Compared to the 5 expression:
- 6.0.0 needs no patches, so the two-stage bootstrap (building a
throwaway compiler just to regenerate the C sources) is gone and the
setup hook is unconditional.
- The tarball now ships a configure script, but it is hand-written rather
than generated by autoconf: it only writes make variables into
config.make and rejects options it does not know, including the ones
stdenv would pass. Since command line variables take precedence over
config.make, keep passing them to make and skip configure.
- checkTarget is set explicitly. The generic check phase probes for a
target with a bare `make check`, which fails because PLATFORM is only
given in makeFlags, so the test suite would silently not run. With it
set, the whole suite passes, so the test disables carried by the 5
expression are not needed here.
Assisted-by: Claude Code (claude-opus-5[1m])
this creates some eval errors that will be fixed in the next commit
done with the following script:
```fish
\#!/usr/bin/env fish
set packagesjson (nix eval --impure --json --expr '
let
lib = import ./lib;
in
import pkgs/servers/x11/xorg/default.nix (lib.mapAttrs (
name: _:
if name == "lib" then
lib
else if name == "config" then
{ allowAliases = false; }
else
name
) (__functionArgs (import pkgs/servers/x11/xorg/default.nix))) { }
' | jq)
set one (grep '^ [A-Za-z0-9_-]*$' pkgs/servers/x11/xorg/default.nix | string trim | string replace -r '$' Z | sort | string sub -e -1)
set two (grep '^ [A-Za-z0-9_-]* = [A-Za-z0-9_-]*;$' pkgs/servers/x11/xorg/default.nix | cut -d= -f1 | string trim | string replace -r '$' Z | sort | string sub -e -1)
for arg in $one $two
set oname $arg
set nname (echo $packagesjson | jq -r .$oname)
if test $nname = null
echo (set_color red)warn:(set_color normal) unknown package xorg.$oname >&2
continue
end
echo $oname "->" $nname
# replace basic xorg.$name references
for file in (rg -F "xorg.$oname" --files-with-matches pkgs)
# special cases
sd -F "$oname = xorg.$oname;" "$nname = $nname;" $file
# replace
sd -F "xorg.$oname" "$nname" $file
# fixup function arguments
# prevent duplicate function args
if grep -E " ($oname|$nname),\$" $file >/dev/null
continue
end
if grep 'xorg\..' $file >/dev/null # case1: there is more so we can't just remove the function arg
if grep ' xorg,$' $file >/dev/null
sd ' xorg,$' " xorg,
$nname," $file
else if grep ' xorg ? .*,$' $file >/dev/null
sd 'xorg( ? .*),$' "xorg\$1,
$nname," $file
else
sd -F 'xorg,' "$nname,
xorg," $file
end
else # case there is no more xorg..* so we can just replace the function arg
sd 'xorg(| ? .*),.*$' "$nname," $file
end
end
end
nix fmt
```
`webkitgtk_4_0` was already transitively insecure because of `libsoup_2_4` and it will be removed soon.
Ideally, we would just replace it with `libsoup_3`-based `webkitgtk_4_1`
but it is unclear if they would work with the 4.1 ABI. At best, the programs
would only be looking for 4.0, failing to build or start, at worst there
might be conflicts with libsoup 2 symbols if that is pulled in by anything
or crashes that will only happen after certain action.
Let’s mark the packages as broken to ensure human intervention.
The llama egg declares a dependency on srfi-4 which is actually part of CHICKEN itself and not an
egg. To salvage it, we remove such bogus dependencies now.
Most eggs in the canonical repository don't declare a `version` property in their `.egg` files. This
is because it's provided implicitly when using `chicken-install` to retrieve them. Quoting from [the
manual](https://wiki.call-cc.org/man/5/Egg%20specification%20format#version):
> Eggs from remote egg servers are automatically versioned - the version is part of the protocol to
retrieve the egg and does not have to be specified in the .egg file.
Since we don't use `chicken-install` to retrieve eggs, this leaves us with a version of "unknown" in
most cases, e.g.:
$ nix-shell -p chickenPackages.chickenEggs.json-abnf chickenPackages.chicken --run chicken-status
abnf ...................................................... version: unknown
iset ...................................................... version: unknown
json-abnf ................................................. version: unknown
lexgen .................................................... version: unknown
regex ......................................................... version: 2.0
srfi-1 .................................................... version: unknown
srfi-127 .................................................. version: unknown
srfi-69 ................................................... version: unknown
utf8 ...................................................... version: unknown
This is usually not an issue unless another egg declares a minimum required version dependency on an
egg with missing version info. In this case, `chicken-install` will fill in "0.0.0" as a fallback
and the check will fail. This has so far been worked around patches (see e.g. #346004 or #358455).
This patch addresses the root cause by following the documentation's recommendation:
> Eggs installed from local directories (see below) should explicitly specify a version.
To do that, `eggDerivation` now simply always adds the version to the generated `.egg-info`
file. This has the added benefit of correcting potentially inconsistent version declarations in
`.egg` files. Note that we cannot patch the original `.egg` file because not all released egg
versions match [the stricter version format validation which currently applies
there](https://bugs.call-cc.org/ticket/1855).
The patch also changes the signature of `eggDerivation` to allow passing in `pname` and `version`
instead of `name` to allow for easy access to the egg version. However, for backwards compatibility,
the old `name` argument is also still supported.
As a result, the aforementioned overrides are removed again and some additional eggs can be marked
as unbroken again.
And finally, this is the output of the above `chicken-status` call with the patch applied:
$ nix-shell -p chickenPackages.chickenEggs.json-abnf chickenPackages.chicken --run chicken-status
abnf .......................................................... version: 8.3
iset .......................................................... version: 2.2
json-abnf ..................................................... version: 7.0
lexgen ........................................................ version: 8.2
regex ......................................................... version: 2.0
srfi-1 ...................................................... version: 0.5.1
srfi-127 ...................................................... version: 1.3
srfi-69 ..................................................... version: 0.4.3
utf8 ........................................................ version: 3.6.3
Many of these packages that are now failing had `-Wno-error=` on clang.
Gcc 14 now also treats incompatible pointer type as errors.
The logical fix is to ignore these errors independent of compiler.
They are not doing anything right now. This is in preparation for their
complete removal from the tree.
Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.
Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This reverts commit 65a333600d.
This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.
It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).
A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.
[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458