nix: add rln-stateless output; disable defaults when features are set - #436
Draft
richard-ramos wants to merge 1 commit into
Draft
nix: add rln-stateless output; disable defaults when features are set#436richard-ramos wants to merge 1 commit into
richard-ramos wants to merge 1 commit into
Conversation
The `stateless` feature exposes the zero-argument form of `ffi_rln_new`,
which downstream Nim/C bindings (e.g. mix-rln-spam-protection-plugin)
rely on. Currently there's no packaged way to consume it — callers have
to fork this flake to add an `override { features = "stateless"; }`.
Two changes:
- flake.nix: expose `rln-stateless = buildRln.override { features =
"stateless"; }` alongside `rln`, so callers can pull it in directly.
- nix/default.nix: when the caller passes `features`, add
`--no-default-features`. Otherwise `--features=stateless` still
pulls in `parallel` (the current default), and the stateless build
actually fails to compile with the `parallel` feature enabled.
`cargoHash` bumped: the current `sha256-3wFnSJYU...` no longer matches
the vendor set that `rustPlatform.buildRustPackage` computes on
nixpkgs 25.11.
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
statelessfeature exposes the zero-argument form offfi_rln_new, which downstream Nim/C bindings (e.g.mix-rln-spam-protection-plugin) rely on. There is currently no packaged way to consume it — every caller has to fork this flake to addoverride { features = "stateless"; }.Changes
flake.nix: exposerln-stateless = buildRln.override { features = "stateless"; }alongsiderln, so callers can pull it in directly.nix/default.nix: when the caller passesfeatures, add--no-default-features. Without this,--features=statelessstill pulls inparallel(the current default), and the stateless build fails to compile withparallelenabled.cargoHashbumped: the previous value no longer matches the vendor set thatrustPlatform.buildRustPackagecomputes on the current nixpkgs 25.11 pin.Verification
```
nix build .#rln # unchanged output, still works
nix build .#rln-stateless # produces librln.{a,so} without parallel
```