Skip to content

Commit bdcd84c

Browse files
Add zvelte-check-bin 0.2.0 (#509)
* Add zvelte-check-bin 0.2.0 A fast Svelte diagnostic tool written in Zig, from the ampcode/homebrew-tap Homebrew formula. First package produced by `pkgmgr import homebrew`. Prebuilt per-arch binaries from upstream's own GitHub releases. Both sha256 values were RECOMPUTED from the downloaded bytes rather than copied out of the formula, so the tap is a cross-check and not the root of trust for the only value anchoring this package's integrity. `strip_prefix` is absent because the archives are genuinely flat — read off the real tarball (`tar -tzf` lists one entry, `zvelte-check`), not guessed. Homebrew auto-strips a single leading directory before `def install` and minimal does not, so this is unknowable from the formula text. Provenance is derived from the ARTIFACT URLs, which are literally github.com/ampcode/zvelte-check/releases/..., and cross-checked against the homepage. That buys real CPE identity (not a dark package) and free version checking via the GitHub tier. NOT a source build, and worth stating plainly: `zig` IS packaged, and pkgs CLAUDE.md prefers building from source when the toolchain exists. Prebuilt was chosen only because pkgmgr has no Zig BuildFlavor yet — not because the toolchain is missing. Mitigating: these are upstream's own release binaries, not a third-party redistribution, and we verify their hashes ourselves. A source-built `zvelte-check` can take the bare name later, which is why this one carries the `-bin` suffix. No reviewer TODOs: licence, provenance, outputs and deps were all resolved mechanically. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * zvelte-check-bin: drop glibc — the binary is statically linked Refined against the real built tree with `pkgmgr import homebrew … --from-build`, which reads the installed ELF instead of guessing. The binary is statically linked (`file`: "ELF 64-bit LSB executable, ARM aarch64 … statically linked"), so it needs no runtime_deps at all. The discovery-mode `[glibc]` was a template default, not an observation. Verified by rebuilding: the package produces a new content-addressed tree and a real 5 MB aarch64 binary at usr/bin/zvelte-check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * zvelte-check-bin: say it is a binary fetch — `binary_from` (review: @twitchyliquid64) Tom's read is right: this installs upstream's release binaries, and nothing in the spec said so. Without `binary_from` the package reads as source-built from `source_provenance`, which is the same conflation that let chromium-bin look like a build of microsoft/playwright. Two halves of the comment, answered separately after checking the source rather than the formula: * `binary_from` — added, per arch, naming the exact artifacts we fetch. * `closed_source` — deliberately NOT set. ampcode/zvelte-check is a public MIT repo with the Zig source in-tree (LICENSE, build.zig, src/), so declaring it closed would be false. The formula's silence is not evidence. `source_provenance` is kept alongside `binary_from`, as chromium-bin does. Here the two name the SAME project — ampcode builds these artifacts in its own release workflow — so the repo is the honest identity of the bytes. Dropping it would cost the CPE identity and the GitHub version-check tier, i.e. turn a covered package into a dark one. Verified: `mip check --packages zvelte-check-bin` all Pass, and `mip dump --packages` resolves binary_from to a real per-arch URL. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 62a71f8 commit bdcd84c

2 files changed

Lines changed: 72 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
let { Attrs, BuildSpec, Local, OutputBin, Source, .. } = import "minimal.ncl" in
2+
let { target, .. } = import "config.ncl" in
3+
let base = import "../base/build.ncl" in
4+
5+
# Imported from the Homebrew formula `ampcode/homebrew-tap/zvelte-check` by `pkgmgr import homebrew`.
6+
#
7+
# PREBUILT vendor binary — there is no source build. The pinned sha256
8+
# per architecture is the ONLY integrity anchor for this package.
9+
let version = "0.2.0" in
10+
let target_suffix = match { { arch = 'Amd64, .. } => "x86_64", { arch = 'Arm64, .. } => "aarch64" } target in
11+
{
12+
name = "zvelte-check-bin",
13+
build_deps = [
14+
{ file = "build.sh" } | Local,
15+
match {
16+
{ arch = 'Amd64, .. } =>
17+
{
18+
url = "https://github.com/ampcode/zvelte-check/releases/download/v%{version}/zvelte-check-linux-x86_64.tar.gz",
19+
sha256 = "f3326fe48a0a2bc056b16ce424abd705ca7864d3632fd8f02ace1ea8ecfc8b9b",
20+
} | Source,
21+
{ arch = 'Arm64, .. } =>
22+
{
23+
url = "https://github.com/ampcode/zvelte-check/releases/download/v%{version}/zvelte-check-linux-aarch64.tar.gz",
24+
sha256 = "05a2661648952ba12b2da618242698c3065d2db375340cb605288a38f59c4105",
25+
} | Source,
26+
} target,
27+
base,
28+
],
29+
# No runtime_deps: the installed binary is statically linked
30+
# (verified against the built tree, not assumed).
31+
32+
cmd = "./build.sh",
33+
build_args = { include version, arch = target_suffix },
34+
35+
outputs = {
36+
zvelte-check = { glob = "usr/bin/zvelte-check" } | OutputBin,
37+
},
38+
39+
attrs =
40+
{
41+
upstream_version = version,
42+
license_spdx = "MIT",
43+
# We install upstream's release BINARIES, not a build of the tree below.
44+
# `binary_from` is what says so; without it the package reads as
45+
# source-built from source_provenance, which is the exact conflation that
46+
# let chromium-bin look like a build of microsoft/playwright.
47+
binary_from =
48+
match {
49+
{ arch = 'Amd64, .. } => "https://github.com/ampcode/zvelte-check/releases/download/v%{version}/zvelte-check-linux-x86_64.tar.gz",
50+
{ arch = 'Arm64, .. } => "https://github.com/ampcode/zvelte-check/releases/download/v%{version}/zvelte-check-linux-aarch64.tar.gz",
51+
} target,
52+
# Kept alongside `binary_from`, as chromium-bin does. Here the two are the
53+
# SAME project — ampcode/zvelte-check builds these artifacts in its own
54+
# release workflow — so the repo is the honest identity of the bytes, and
55+
# dropping it would cost the CPE identity and the GitHub version-check
56+
# tier, i.e. make this a dark package. `closed_source` deliberately absent:
57+
# the repo is public and MIT with the Zig source in-tree (verified, not
58+
# inferred from the formula).
59+
source_provenance = {
60+
category = 'GithubRepo,
61+
owner = "ampcode",
62+
repo = "zvelte-check",
63+
},
64+
} | Attrs,
65+
} | BuildSpec

packages/zvelte-check-bin/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
# Imported from the Homebrew formula `ampcode/homebrew-tap/zvelte-check` by `pkgmgr import homebrew`.
3+
# Prebuilt vendor binary: unpacked and installed, never compiled.
4+
set -ex
5+
6+
tar -xof "zvelte-check-linux-${MINIMAL_ARG_ARCH}.tar.gz"
7+
install -D -m 755 "zvelte-check" "$OUTPUT_DIR/usr/bin/zvelte-check"

0 commit comments

Comments
 (0)