Skip to content

Add 6 foundational libraries imported from Wolfi (brotli, jsoncpp, jemalloc, re2, zeromq, stress-ng) - #367

Merged
bryan-minimal merged 2 commits into
mainfrom
add-wolfi-imports-batch1
Jul 9, 2026
Merged

Add 6 foundational libraries imported from Wolfi (brotli, jsoncpp, jemalloc, re2, zeromq, stress-ng)#367
bryan-minimal merged 2 commits into
mainfrom
add-wolfi-imports-batch1

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Jul 8, 2026

Copy link
Copy Markdown
Member

First batch from pkgmgr import-wolfi — a new tool that seeds Minimal build definitions from Wolfi (wolfi-dev/os) melange recipes, then refines outputs + runtime_deps from a verified build. These 6 were chosen by dependency fan-in (foundational) + GitHub stars (demand).

package upstream build runtime_deps (from ELF DT_NEEDED)
brotli 1.2.0 google/brotli cmake, C glibc
jsoncpp 1.9.8 open-source-parsers/jsoncpp cmake, C++ glibc, gcc[libgcc,libstdcpp]
jemalloc 5.3.1 jemalloc/jemalloc autotools glibc, gcc[libgcc,libstdcpp]
re2 2025-11-05 google/re2 cmake, C++ glibc, gcc[…], abseil-cpp, icu
zeromq 4.3.5 zeromq/libzmq cmake, C++ glibc, gcc[…], libsodium
stress-ng 0.21.03 ColinIanKing/stress-ng Makefile glibc, gcc[libatomic], acl, gmp, libjpeg-turbo, mpfr, xz, zlib

How they were produced

  • Sources mirrored to gs://minimal-staging-archives/<owner>/<repo>/<tag>.tar.gz (reproducible, sha256-pinned) and referenced via gs:// URLs.
  • outputs derived from the real install manifest; runtime_deps resolved from every installed object's ELF DT_NEEDED (verified exact against ldd).
  • Each builds clean and passes every minimal check checker (parse/fmt/imports/output-naming/enumerate-bins/missing-runtime_deps/standalone-tests) at 0 TODOs.
  • Reviewed adversarially in 3 rounds (~120 findings, verify-by-refutation) — provenance verified correct for vuln-scanning on all 6; the CMake exports resolve for downstream find_package(); the tests compile-link-run real consumers.

Reviewer notes (surfaced, not hidden)

  • jemalloc: the gcc-16 build fix is vendored as a .patch (upstream cherry-pick 1a15fe33, matching Wolfi) — inert on gcc-15, prevents FTBFS once gcc bumps to 16. jemalloc.pc reports Version: 5.3.1_ (Wolfi/upstream parity — it's jemalloc's own pkg-config template; passes every pkg-config version gate; header + jemalloc-config report clean 5.3.1).
  • stress-ng: ships a different (not strictly smaller) stressor set than Wolfi — 8 optional feature libs (keyutils/kmod/libaio/libsctp/…) aren't packaged in Minimal so those stressors compile out as skip-stubs; Minimal adds gmp/mpfr/xz stressors Wolfi omits. Reduced-scope by construction; builds fail-open.
  • Follow-up (not blocking): no package in pkgs — these or production siblings (abseil-cpp/protobuf/gtest/onetbb) — exercises a find_package() consumer in its test block. That's the exact seam a lib64 export bug slipped through during review. Worth a minimal check step that auto-generates a find_package(<pkg> REQUIRED) smoke test for any package shipping a cmake_data output, closing it fleet-wide.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added packaging support for Brotli, jemalloc, jsoncpp, RE2, stress-ng, and ZeroMQ.
    • ZeroMQ now includes the curve_keygen command-line tool.
  • Bug Fixes

    • Improved jemalloc compatibility with newer toolchains and better C++ exception handling.
    • Refined build settings so packages install shared artifacts consistently and avoid unwanted static outputs.
  • Tests

    • Added smoke and compile/link checks across several packages to verify basic runtime behavior and installability.

…malloc, re2, zeromq, stress-ng)

The first batch from `pkgmgr import-wolfi` — a new tool that seeds Minimal build
definitions from Wolfi (wolfi-dev/os) melange recipes, then refines outputs +
runtime_deps from a verified build. Chosen by dependency fan-in (foundational)
+ GitHub stars (demand); all build-proven and reproducibly sourced.

| package | upstream | build | runtime_deps (from ELF DT_NEEDED) |
|---|---|---|---|
| brotli 1.2.0 | google/brotli | cmake, C | glibc |
| jsoncpp 1.9.8 | open-source-parsers/jsoncpp | cmake, C++ | glibc, gcc[libgcc,libstdcpp] |
| jemalloc 5.3.1 | jemalloc/jemalloc | autotools | glibc, gcc[libgcc,libstdcpp] |
| re2 2025-11-05 | google/re2 | cmake, C++ | glibc, gcc[..], abseil-cpp, icu |
| zeromq 4.3.5 | zeromq/libzmq | cmake, C++ | glibc, gcc[..], libsodium |
| stress-ng 0.21.03 | ColinIanKing/stress-ng | Makefile | glibc, gcc[libatomic], acl, gmp, libjpeg-turbo, mpfr, xz, zlib |

How they were produced:
- Sources mirrored to gs://minimal-staging-archives/<owner>/<repo>/<tag>.tar.gz
  (reproducible; sha256-pinned) and referenced via gs:// URLs.
- outputs derived from the real install manifest; runtime_deps resolved from
  every installed object's ELF DT_NEEDED (verified exact against `ldd`).
- Each builds clean and passes every `minimal check` checker (parse/fmt/imports/
  output-naming/enumerate-bins/missing-runtime_deps/standalone-tests) at 0 TODOs.
- Reviewed adversarially in 3 rounds (~120 findings) — provenance verified
  correct for vuln-scanning on all 6; the CMake exports resolve for downstream
  find_package(); tests compile-link-run real consumers.

Reviewer notes (surfaced, not hidden):
- jemalloc: gcc-16 build fix vendored as a .patch (upstream cherry-pick 1a15fe33,
  matching Wolfi) — inert on gcc-15, prevents FTBFS once gcc bumps to 16.
  jemalloc.pc reports `Version: 5.3.1_` (Wolfi/upstream parity — jemalloc's own
  pkg-config template; passes every pkg-config version gate; header + config
  script report clean 5.3.1).
- stress-ng: a *different* (not strictly smaller) stressor set than Wolfi — 8
  optional feature libs (keyutils/kmod/libaio/libsctp/…) aren't packaged in
  Minimal so those stressors compile out as skip-stubs; Minimal adds gmp/mpfr/xz
  stressors Wolfi omits. Reduced-scope by construction, builds fail-open.
- Follow-up (not blocking): no package in pkgs (imports or production siblings
  abseil-cpp/protobuf/gtest) exercises a find_package() consumer in its test —
  worth a `minimal check` step that auto-generates one for any cmake_data output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: df7c61a0-981b-417f-9572-9025172714af

📥 Commits

Reviewing files that changed from the base of the PR and between ba61e6d and d593618.

📒 Files selected for processing (10)
  • packages/brotli/build.ncl
  • packages/brotli/build.sh
  • packages/jemalloc/build.sh
  • packages/jsoncpp/build.ncl
  • packages/jsoncpp/build.sh
  • packages/re2/build.ncl
  • packages/re2/build.sh
  • packages/stress-ng/build.sh
  • packages/zeromq/build.ncl
  • packages/zeromq/build.sh
📝 Walkthrough

Walkthrough

This PR adds new Wolfi-imported package build specifications and shell build scripts for six packages: brotli, jemalloc, jsoncpp, re2, stress-ng, and zeromq. Each package defines build/runtime dependencies, outputs, metadata, and tests. Jemalloc and zeromq additionally include patches (gcc-16 C++ exceptions fix, and a curve_keygen CMake build/install addition).

Changes

Brotli Package

Layer / File(s) Summary
Build spec, script, and smoke tests
packages/brotli/build.ncl, packages/brotli/build.sh
Defines dependencies, source pin, CMake-based build outputs, runtime deps, metadata, and a smoke test suite; build.sh performs the CMake configure/build/install.

Jemalloc Package

Layer / File(s) Summary
Build spec and build script
packages/jemalloc/build.ncl, packages/jemalloc/build.sh
Defines build/runtime deps, outputs, metadata, and tests; build.sh writes VERSION, runs autoreconf/configure/make/install.
GCC-16 C++ exceptions patch
packages/jemalloc/jemalloc-gcc16-cxx-exceptions.patch
Adds configure-time detection of C++ exception support and replaces std::__throw_bad_alloc with throw std::bad_alloc()/std::terminate() based on a new JEMALLOC_HAVE_CXX_EXCEPTIONS macro.

Jsoncpp Package

Layer / File(s) Summary
Build spec, script, and smoke test
packages/jsoncpp/build.ncl, packages/jsoncpp/build.sh
Defines deps, outputs, metadata, and smoke test; build.sh builds shared-only libraries via CMake.

RE2 Package

Layer / File(s) Summary
Build spec, script, and compile_link test
packages/re2/build.ncl, packages/re2/build.sh
Pins version, defines deps/outputs/runtime deps/metadata and a compile_link test; build.sh runs a CMake release/ICU build.

Stress-ng Package

Layer / File(s) Summary
Build spec, script, and smoke test
packages/stress-ng/build.ncl, packages/stress-ng/build.sh
Defines deps/outputs/runtime deps/metadata and a deterministic smoke test; build.sh runs make build/install.

ZeroMQ Package

Layer / File(s) Summary
Build spec, script, and curve_keygen patch
packages/zeromq/build.ncl, packages/zeromq/build.sh, packages/zeromq/0001-cmake-add-curve_keygen-binary.patch
Defines deps/outputs/runtime deps/metadata and a compile-link test verifying curve_keygen output; build.sh applies the patch before CMake build/install; patch adds a curve_keygen executable to CMakeLists.txt.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

  • gominimal/pkgmgr-rs#472: These build.ncl/build.sh additions across six packages follow the same Wolfi-seeded import pattern described by the pkgmgr import-wolfi workflow.

Suggested reviewers: msample, twitchyliquid64

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: importing six Wolfi-based foundation packages into Minimal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-wolfi-imports-batch1

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (2)
packages/brotli/build.ncl (2)

4-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Import order violates alphabetical ordering guideline.

glibc (line 9) should be ordered alphabetically between cmake and make, not placed last.

♻️ Proposed fix
 let base = import "../base/build.ncl" in
 let cmake = import "../cmake/build.ncl" in
+let glibc = import "../glibc/build.ncl" in
 let make = import "../make/build.ncl" in
 let pkgconf = import "../pkgconf/build.ncl" in
 let toolchain = import "../toolchain/build.ncl" in
-let glibc = import "../glibc/build.ncl" in

As per coding guidelines, "Import package dependencies... with lowercase identifiers ordered alphabetically before uppercase identifiers."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/brotli/build.ncl` around lines 4 - 9, The import list in build.ncl
is out of alphabetical order, with glibc placed after toolchain instead of
between cmake and make. Reorder the top-level imports in the package dependency
block so the lowercase identifiers are sorted alphabetically, keeping the
existing import names like base, cmake, glibc, make, pkgconf, and toolchain in
the correct sequence.

Source: Coding guidelines


13-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

make build dep used instead of ninja for a CMake build.

Coding guidelines require CMake builds to use the Ninja generator, but this package pulls in make and build.sh invokes cmake without -G Ninja. See paired comment in build.sh.

As per coding guidelines, "For CMake builds, use Ninja generator with '-DCMAKE_BUILD_TYPE=Release' and '-DCMAKE_INSTALL_PREFIX=/usr'."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/brotli/build.ncl` around lines 13 - 20, The Brotli CMake package is
using make instead of the required Ninja-based CMake flow. Update the build
definition and related build script so the package depends on ninja rather than
make, and make sure build.sh invokes cmake with the Ninja generator plus the
required Release build type and /usr install prefix. Use the existing build_deps
list and build.sh entry points to locate the changes.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/brotli/build.sh`:
- Around line 5-8: The CMake build in build.sh is missing the required Ninja
generator and reproducibility toolchain flags. Update the cmake configure step
to use the Ninja generator in the existing CMake invocation, and ensure the
build script exports CFLAGS/CXXFLAGS, LDFLAGS, and ARFLAGS with the required
reproducibility values before running cmake --build and cmake --install. Keep
the existing build flow centered around the current cmake and DESTDIR install
commands, and align the flags with the package build guidelines for reproducible
C/C++ builds.

In `@packages/jemalloc/build.sh`:
- Around line 9-13: The jemalloc autotools build is missing the required
reproducibility settings; update the build logic in build.sh to export the
standard C/C++ reproducibility flags before configure/make, including
CFLAGS/CXXFLAGS with the file-prefix map and no-record-gcc-switches options,
LDFLAGS with build-id disabled, and ARFLAGS set for deterministic archives. Also
pass --enable-deterministic-archives to the ./configure invocation, and after
make install remove any generated .la files from "$OUTPUT_DIR" with the existing
post-install cleanup pattern so the output stays reproducible.

In `@packages/jsoncpp/build.sh`:
- Around line 12-13: The build script for the JSONCPP package is using the
default CMake generator instead of the required Ninja generator, and the related
package manifest is missing the Ninja build dependency. Update the build flow in
build.sh to invoke CMake with the Ninja generator while keeping the existing
Release and /usr install settings, and adjust build.ncl so build_deps includes
ninja or ninja-build. Use the existing cmake invocation in build.sh and the
package metadata in build.ncl as the places to fix.
- Line 12: The cmake invocation in the jsoncpp build script is missing the
reproducibility flags required by the coding guidelines. Update the build
configuration to pass the C/C++ compiler flags and linker flags through the
CMake variables used by the build, and ensure the archive tool flags are set as
well; locate the change in the cmake command itself so the build applies the
same reproducibility settings consistently. Use the existing build script entry
point to add the required flag values rather than changing unrelated build
behavior.

In `@packages/re2/build.ncl`:
- Line 10: The import binding in the top-level let expression uses an invalid
Nickel identifier, so rename the binding in the import statement to a valid bare
name and update any references to that binding in the same file. Locate the
issue in the let/import declaration for the abseil-cpp dependency and choose an
identifier that does not contain hyphens.

In `@packages/re2/build.sh`:
- Around line 6-7: The build script currently relies on CMake’s default
Makefiles generator instead of Ninja, so update the cmake invocation in build.sh
to explicitly use the Ninja generator while keeping the existing Release build
type and install prefix settings. Make sure the build pipeline is aligned with
this change by adjusting the related build dependency from make to ninja in
build.ncl so cmake --build uses Ninja consistently.
- Around line 6-8: The RE2 build script is missing the required reproducibility
flags for its C/C++ build. Update the build setup in build.sh so the cmake
invocation or surrounding environment exports CFLAGS and CXXFLAGS with
-ffile-prefix-map=$(pwd)=/builddir -gno-record-gcc-switches, LDFLAGS with
-Wl,--build-id=none, and ARFLAGS='Drc'. Keep the changes near the existing cmake
-S . -B build and cmake --build build steps so the flags are applied throughout
the build and install flow.

In `@packages/stress-ng/build.sh`:
- Around line 1-6: The build script is missing the reproducibility flags
required for C/C++ builds. Update the package build flow in build.sh so the make
invocation for stress-ng exports CFLAGS and CXXFLAGS with the file-path mapping
and no-record-switches options, sets LDFLAGS to disable build IDs, and sets
ARFLAGS to Drc before calling make/install. Keep the changes anchored around the
existing CC/CXX setup and make commands so the compiled binary does not leak
build paths or nondeterministic metadata.

In `@packages/zeromq/build.sh`:
- Around line 11-13: The Zeromq CMake build is using the default generator
instead of Ninja, so update the build flow in build.sh to invoke cmake with the
Ninja generator while keeping the existing Release build type and install prefix
settings. Also make sure the package metadata in build.ncl includes ninja in
build_deps alongside make so the generator is available during builds.

---

Nitpick comments:
In `@packages/brotli/build.ncl`:
- Around line 4-9: The import list in build.ncl is out of alphabetical order,
with glibc placed after toolchain instead of between cmake and make. Reorder the
top-level imports in the package dependency block so the lowercase identifiers
are sorted alphabetically, keeping the existing import names like base, cmake,
glibc, make, pkgconf, and toolchain in the correct sequence.
- Around line 13-20: The Brotli CMake package is using make instead of the
required Ninja-based CMake flow. Update the build definition and related build
script so the package depends on ninja rather than make, and make sure build.sh
invokes cmake with the Ninja generator plus the required Release build type and
/usr install prefix. Use the existing build_deps list and build.sh entry points
to locate the changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a6fc55af-341c-4803-a998-f587400a2809

📥 Commits

Reviewing files that changed from the base of the PR and between 99f1af9 and ba61e6d.

📒 Files selected for processing (14)
  • packages/brotli/build.ncl
  • packages/brotli/build.sh
  • packages/jemalloc/build.ncl
  • packages/jemalloc/build.sh
  • packages/jemalloc/jemalloc-gcc16-cxx-exceptions.patch
  • packages/jsoncpp/build.ncl
  • packages/jsoncpp/build.sh
  • packages/re2/build.ncl
  • packages/re2/build.sh
  • packages/stress-ng/build.ncl
  • packages/stress-ng/build.sh
  • packages/zeromq/0001-cmake-add-curve_keygen-binary.patch
  • packages/zeromq/build.ncl
  • packages/zeromq/build.sh

Comment thread packages/brotli/build.sh
Comment thread packages/jemalloc/build.sh
Comment thread packages/jsoncpp/build.sh Outdated
Comment thread packages/jsoncpp/build.sh Outdated
Comment on lines +12 to +13
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DBUILD_STATIC_LIBS=OFF -DBUILD_OBJECT_LIBS=OFF
cmake --build build -j"$(nproc)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Not using the Ninja generator required by coding guidelines.

As per coding guidelines, "For CMake builds, use Ninja generator with '-DCMAKE_BUILD_TYPE=Release' and '-DCMAKE_INSTALL_PREFIX=/usr'". This script omits -G Ninja (defaulting to Unix Makefiles) and doesn't include ninja/ninja-build in build_deps in the corresponding build.ncl.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/jsoncpp/build.sh` around lines 12 - 13, The build script for the
JSONCPP package is using the default CMake generator instead of the required
Ninja generator, and the related package manifest is missing the Ninja build
dependency. Update the build flow in build.sh to invoke CMake with the Ninja
generator while keeping the existing Release and /usr install settings, and
adjust build.ncl so build_deps includes ninja or ninja-build. Use the existing
cmake invocation in build.sh and the package metadata in build.ncl as the places
to fix.

Source: Coding guidelines

Comment thread packages/re2/build.ncl
let pkgconf = import "../pkgconf/build.ncl" in
let toolchain = import "../toolchain/build.ncl" in
let glibc = import "../glibc/build.ncl" in
let abseil-cpp = import "../abseil-cpp/build.ncl" in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if hyphenated let-identifiers are used elsewhere in the repo and whether they parse.
rg -n 'let [a-z0-9_]+-[a-z0-9_-]+ = import' --type-add 'ncl:*.ncl' -t ncl

Repository: gominimal/pkgs

Length of output: 152


🌐 Web query:

Nickel language identifier syntax hyphen unquoted let binding variable names

💡 Result:

In the Nickel language, standard identifiers must follow a specific naming convention: they start with zero or more underscores, followed by an alphabetic character (a–z or A–Z) [1]. Because of this requirement, identifiers cannot contain hyphens (e.g., -) when written in their standard, unquoted form. If you need to use an identifier that includes a hyphen or other characters not permitted by the standard identifier syntax, you must use dynamic record access or similar workarounds, as the language does not currently support unquoted raw identifiers containing hyphens in let bindings [2]. For let bindings specifically, Nickel supports standard let expressions (e.g., let x = 1 in x) as well as a block syntax for multiple bindings that uses commas as separators (e.g., let x = 1, y = 2 in x + y) [3][4]. Neither of these syntaxes allows the use of hyphens within the unquoted variable name itself.

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Inspect the relevant build file and search for any Nickel-style bindings with hyphenated names.
sed -n '1,80p' packages/re2/build.ncl
printf '\n---\n'
rg -n 'let [^=]+- [^=]+ =|let [^=]+-[^=]+ =' packages -g '*.ncl'

Repository: gominimal/pkgs

Length of output: 13007


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the target file and inspect nearby Nickel import bindings for naming patterns.
cat -n packages/re2/build.ncl | sed -n '1,40p'

printf '\n---\n'

# Look for any let-bindings with hyphens or quoted identifiers in build.ncl files.
rg -n '^\s*let\s+[^=]*-[^=]*=' packages -g '*.ncl' || true
printf '\n---\n'
rg -n '^\s*let\s+["'\''][^"'\''"]+["'\'']\s*=' packages -g '*.ncl' || true

Repository: gominimal/pkgs

Length of output: 12138


🌐 Web query:

Nickel language syntax let binding identifiers hyphen variable names official docs

💡 Result:

In the Nickel configuration language, standard identifiers (used for variable names in let bindings or field names) cannot contain hyphens [1]. According to the Nickel user manual, identifiers must start with zero or more underscores, followed by an alphabetic character [1]. Consequently, hyphens are not valid characters for standard Nickel identifiers. If you need to use a key containing a hyphen (for example, when generating JSON or YAML that requires hyphens in keys), you must use string-based record fields or dynamic identifiers [2]. While standard identifiers do not support hyphens, string literals used as record fields do [2]. Note: Ensure you do not confuse the Nickel configuration language (nickel-lang.org) with the unrelated language Nickle (nickle.org), which has different syntax rules [3].

Citations:


Rename this binding to a valid Nickel identifier. abseil-cpp is not a valid bare let name, so this line will not parse as written.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/re2/build.ncl` at line 10, The import binding in the top-level let
expression uses an invalid Nickel identifier, so rename the binding in the
import statement to a valid bare name and update any references to that binding
in the same file. Locate the issue in the let/import declaration for the
abseil-cpp dependency and choose an identifier that does not contain hyphens.

Comment thread packages/re2/build.sh Outdated
Comment thread packages/re2/build.sh Outdated
Comment thread packages/stress-ng/build.sh
Comment thread packages/zeromq/build.sh Outdated
AGENTS.md requires C/C++ builds to strip build paths / build-id and to build
CMake with Ninja; the importer omitted these (now fixed at the template in
pkgmgr, this applies the same to the already-imported packages):

- all six: export CFLAGS/CXXFLAGS (-ffile-prefix-map=$(pwd)=/builddir
  -gno-record-gcc-switches), LDFLAGS (-Wl,--build-id=none), ARFLAGS=Drc.
- brotli, jsoncpp, re2, zeromq (cmake): pass -G Ninja; build_deps make -> ninja.
- jemalloc (autotools): --enable-deterministic-archives + drop *.la post-install.
- stress-ng (make): drop *.la post-install.

All six rebuilt clean (minimal package --rebuild --no-fetch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bryan-minimal

Copy link
Copy Markdown
Member Author

Addressed CodeRabbit review (pushed)

The dominant finding was the AGENTS.md C/C++ reproducibility flags. Fixed on all six, and root-caused into the importer so it stops recurring (pkgmgr-rs #471):

  • All six now export CFLAGS/CXXFLAGS (-ffile-prefix-map=$(pwd)=/builddir -gno-record-gcc-switches), LDFLAGS (-Wl,--build-id=none), ARFLAGS=Drc.
  • brotli, jsoncpp, re2, zeromq (cmake): pass -G Ninja; build_deps makeninja.
  • jemalloc (autotools): --enable-deterministic-archives + drop *.la post-install.
  • stress-ng (make): drop *.la post-install.

All six rebuilt clean with minimal package --rebuild --no-fetch.

One dismissed as a false positive

re2/build.ncl — "abseil-cpp is not a valid bare let name". Nickel does permit hyphens in identifiers: 111 already-merged packages use hyphenated let bindings (abseil-cpp, c-ares, ca-certificates, …), and re2 both builds and passes minimal check. Left as-is.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 6253096 Jul 9, 2026
6 checks passed
@bryan-minimal
bryan-minimal deleted the add-wolfi-imports-batch1 branch July 9, 2026 01:00
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.

2 participants