Skip to content

Simplify Nix flake configuration - #118

Closed
pranc1ngpegasus wants to merge 7 commits into
mainfrom
feat/simplify-nix-flake
Closed

Simplify Nix flake configuration#118
pranc1ngpegasus wants to merge 7 commits into
mainfrom
feat/simplify-nix-flake

Conversation

@pranc1ngpegasus

Copy link
Copy Markdown
Member

Summary

  • replace the hand-written Crane wiring with rust-flake
  • move formatting checks to treefmt-nix for Nix, Swift, and TOML
  • expose the Rust development shell through the flake modules
  • include the WispAudioKit Swift sources in Crane's filtered source tree
  • make SwiftPM builds work inside the Nix sandbox by using the Apple Swift toolchain, disabling SwiftPM's nested sandbox, and assigning a writable HOME
  • align the pinned Rust toolchain with the available Nix toolchain and apply the configured formatters

Why

The previous flake duplicated package and check wiring across local Nix modules. Moving that setup to rust-flake and treefmt-nix makes the flake smaller and lets checks and package outputs follow the Cargo workspace automatically.

The generated macOS Clippy derivations also exposed two SwiftPM integration problems: WispAudioKit sources were filtered out of the Nix source, and SwiftPM attempted to use an unavailable tool or create a nested macOS sandbox. This change explicitly carries the Swift package into the source and gives SwiftPM a writable, sandbox-compatible environment.

Impact

Developers get generated per-crate package, documentation, and Clippy outputs plus a unified formatter check. Swift source formatting changes in this PR are formatter-only.

Validation

  • cargo fmt --all -- --check
  • nix build .#checks.aarch64-darwin.wisp-audiokit-sys-clippy --print-build-logs
  • nix build .#checks.aarch64-darwin.wisp-audiokit-clippy --print-build-logs
  • checks.aarch64-darwin.treefmt
  • checks.aarch64-darwin.wisp-core-clippy
  • checks.aarch64-darwin.wisp-lifecycle-clippy
  • checks.aarch64-darwin.wisp-mcp-clippy

A complete local nix flake check reaches wisp-desktop but cannot compile GPUI's Metal shaders because this machine only has Command Line Tools and no Metal Toolchain. The CI macOS environment is expected to provide Metal.

@pranc1ngpegasus
pranc1ngpegasus force-pushed the feat/simplify-nix-flake branch from baa477a to aecafe6 Compare August 2, 2026 16:06
@pranc1ngpegasus
pranc1ngpegasus force-pushed the feat/simplify-nix-flake branch from aecafe6 to ba27bd6 Compare August 2, 2026 16:07
@pranc1ngpegasus
pranc1ngpegasus deleted the feat/simplify-nix-flake branch August 4, 2026 00:38
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.

1 participant