An easy-to-host PDS on the ATProtocol, MacOS. Grandma-approved.

feat(MM-65): add nix build output for relay binary using crane #3

merged opened by malpercio.dev targeting main from malpercio/mm-65-nix-flake-relay-build-output

Summary#

  • Adds nix build .#relay (and nix build via default) to flake.nix
  • Uses crane's two-phase build (buildDepsOnlybuildPackage) for cached dependency derivations
  • Passes sqlite + pkg-config so rusqlite links correctly; LIBSQLITE3_SYS_USE_PKG_CONFIG=1 mirrors the devenv setup
  • Pins crane via flake.lock

Test plan#

  • nix build .#relay --accept-flake-config completes without error
  • ./result/bin/relay runs without crashing (prints relay starting)
  • nix build --accept-flake-config (default) also resolves to the relay binary
  • Dev shell still works: nix develop --impure --accept-flake-config

Closes MM-65

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:web:malpercio.dev/sh.tangled.repo.pull/3mgjgjj65hz22
+3 -2
Interdiff #1 #2
.envrc

This file has not been changed.

+2 -1
CLAUDE.md
··· 1 # ezpds 2 3 - Last verified: 2026-03-07 4 5 ## Tech Stack 6 - Language: Rust (stable channel via rust-toolchain.toml) ··· 10 11 ## Commands 12 - `nix develop --impure --accept-flake-config` - Enter dev shell (flags required; --impure for devenv CWD detection, --accept-flake-config activates the Cachix binary cache in nixConfig — without it, a cold build takes 20+ minutes) 13 - `cargo build` - Build all crates 14 - `cargo test` - Run all tests 15 - `cargo clippy` - Lint
··· 1 # ezpds 2 3 + Last verified: 2026-03-08 4 5 ## Tech Stack 6 - Language: Rust (stable channel via rust-toolchain.toml) ··· 10 11 ## Commands 12 - `nix develop --impure --accept-flake-config` - Enter dev shell (flags required; --impure for devenv CWD detection, --accept-flake-config activates the Cachix binary cache in nixConfig — without it, a cold build takes 20+ minutes) 13 + - `nix build .#relay --accept-flake-config` - Build relay binary (output at ./result/bin/relay) 14 - `cargo build` - Build all crates 15 - `cargo test` - Run all tests 16 - `cargo clippy` - Lint
docs/design-plans/2026-03-07-MM-64.md

This file has not been changed.

docs/implementation-plans/2026-03-07-MM-64/phase_01.md

This file has not been changed.

docs/implementation-plans/2026-03-07-MM-64/phase_02.md

This file has not been changed.

docs/implementation-plans/2026-03-07-MM-64/test-requirements.md

This file has not been changed.

docs/v01-issue-plan.md

This file has not been changed.

flake.lock

This file has not been changed.

+1 -1
flake.nix
··· 26 inherit system; 27 overlays = [ (import rust-overlay) ]; 28 }; 29 - rustToolchain = pkgs.rust-bin.stable.latest.default; 30 craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; 31 32 commonArgs = {
··· 26 inherit system; 27 overlays = [ (import rust-overlay) ]; 28 }; 29 + rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; 30 craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; 31 32 commonArgs = {

History

3 rounds 0 comments
sign up or login to add to the discussion
3 commits
expand
fix(envrc): pass --impure to fix direnv shell activation; add docs
feat(MM-65): add nix build output for relay binary using crane
fix(MM-65): address PR review — toolchain parity and CLAUDE.md
expand 0 comments
pull request successfully merged
2 commits
expand
fix(envrc): pass --impure to fix direnv shell activation; add docs
feat(MM-65): add nix build output for relay binary using crane
expand 0 comments
1 commit
expand
fix(envrc): pass --impure to fix direnv shell activation; add docs
expand 0 comments