demo: ship the GPL x264 flavor in the docker image - #154
Merged
Conversation
The demo image built plain `blit` (openh264). Ship the GPL flavor instead — same feature flags as the BLIT_GPL=1 install (--no-default-features --features x264) — so the container's software H.264 path uses the better encoder, including 4:4:4. The image already bundles plenty of GPL software, so nothing changes about its distribution terms in practice. - packages.nix: fold the crane blit package into a mkBlit flavor function, add blit-gpl, expose it as a Linux package (nix build .#blit-gpl), and put it in the demo image contents - README: note the demo image carries the GPL flavor Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Coverage
|
jsegaran
approved these changes
Aug 2, 2026
pcarrier
added a commit
that referenced
this pull request
Aug 2, 2026
The demo image built plain `blit` (openh264). Ship the GPL flavor instead — same feature flags as the `BLIT_GPL=1` install (`--no-default-features --features x264`) — so the container's software H.264 path uses the better encoder, including 4:4:4. The image already bundles plenty of GPL software (busybox, git, …), so nothing changes about its distribution terms in practice. - `nix/packages.nix`: fold the crane `blit` package into a `mkBlit` flavor function, add `blit-gpl`, expose it as a Linux package (`nix build .#blit-gpl`), and put it in the demo image contents - README: note the demo image carries the GPL flavor ## Verified - `nix build .#blit-gpl` succeeds; the produced binary's `blit --license` reports the libx264/GPL-2.0-or-later notice - `.#demo-image` evaluates
Closed
pcarrier
added a commit
that referenced
this pull request
Aug 3, 2026
`publish-bin-npm` has been red since 0.43.0, so npm still has `@blit-sh/bin` 0.42.0 while `@blit-sh/core` and `@blit-sh/browser` are at 0.43.0: ``` scanning /home/runner/work/blit/blit/artifacts for release artifacts... error: conflicting versions in artifacts: 0.43.0 vs blit-gpl ``` #152/#154 added `blit-gpl_*` tarballs to the release, and `bin/build-npm-bin-packages` scans every `*.tar.gz`; stripping the `blit_` prefix off `blit-gpl_0.43.0_linux_x86_64` leaves the name untouched, so it read `blit-gpl` as the version. Rather than skipping those artifacts, this publishes them: **`@blit-sh/bin-gpl`** plus `@blit-sh/bin-gpl-linux-{x64,arm64}[-musl]`, licensed `GPL-2.0-or-later`, so anyone who wants the x264 build can take it off npm instead of unpacking a release tarball behind a hand-maintained digest pin. Details worth a look: - Both launchers ship the same `npm/bin` sources. `resolve.js` used to hardcode `@blit-sh/bin-…`; it now reads its own package name, so one copy serves both flavors and the "no prebuilt binary" message names the right package. - The GPL launcher has **no `bin` field**. Two packages claiming the `blit` shim would collide wherever both are installed (neo will have both: GPL for linux boxes, MIT for the macOS desktop). Spawn its default export, or use `curl -sf https://install.blit.sh | BLIT_GPL=1 sh` for a CLI. - `license` is `GPL-2.0-or-later` on the GPL packages and stays `MIT` on the rest. Windows and macOS have no GPL build, so that set is unchanged. - The first publish of each new package name has to be manual — npm only lets you configure trusted publishing on a package that already exists — so the script's usage comment now spells out the local bootstrap. ## Verified Ran the script over a fixture artifact set holding both flavors (`blit_0.43.0_{linux,linux-musl}_{x86_64,aarch64}`, `blit_0.43.0_darwin_aarch64`, `blit_0.43.0_windows_x86_64.zip`, and the four `blit-gpl_*`): it generates the ten platform packages plus both launchers at `0.43.0`, with `.publish-order` listing platform packages first. The same fixtures reproduce the CI error on `main`. `npm pack`ed `@blit-sh/bin`, `@blit-sh/bin-gpl` and their linux-x64 platform packages and installed all four into one project: `require`/`import` of each launcher resolves to its own binary (`@blit-sh/bin` → the MIT one, `@blit-sh/bin-gpl` → the GPL one), `candidatePackages()` returns the right prefixes, and `node_modules/.bin` holds exactly one `blit`. [](https://app.indent.com/c/019fc45e-4144-7ab5-bae5-e47db3ae9aeb) Tag `@indent` to continue the conversation here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The demo image built plain
blit(openh264). Ship the GPL flavor instead — same feature flags as theBLIT_GPL=1install (--no-default-features --features x264) — so the container's software H.264 path uses the better encoder, including 4:4:4. The image already bundles plenty of GPL software (busybox, git, …), so nothing changes about its distribution terms in practice.nix/packages.nix: fold the craneblitpackage into amkBlitflavor function, addblit-gpl, expose it as a Linux package (nix build .#blit-gpl), and put it in the demo image contentsVerified
nix build .#blit-gplsucceeds; the produced binary'sblit --licensereports the libx264/GPL-2.0-or-later notice.#demo-imageevaluates