Skip to content

Add official Nix flake build/dev workflow#92

Merged
OlaProeis merged 1 commit intoOlaProeis:masterfrom
liuxiaopai-ai:feat/nixos-flake-support-87
Feb 26, 2026
Merged

Add official Nix flake build/dev workflow#92
OlaProeis merged 1 commit intoOlaProeis:masterfrom
liuxiaopai-ai:feat/nixos-flake-support-87

Conversation

@liuxiaopai-ai
Copy link
Contributor

@liuxiaopai-ai liuxiaopai-ai commented Feb 26, 2026

Summary

This PR adds first-class Nix/NixOS support with minimal-risk changes focused on packaging and docs.

What changed

  • Added flake.nix with:
    • packages.<system>.ferrite + packages.<system>.default
    • apps.<system>.default for nix run
    • devShells.<system>.default with Rust toolchain + platform deps
    • support for x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin
  • Added flake.lock (pinned inputs)
  • Added CI workflow .github/workflows/nix.yml to:
    • evaluate package outputs for all supported systems
    • run nix flake check on Linux
  • Updated documentation:
    • README.md: Nix install/run/build/develop instructions
    • docs/building.md: dedicated Nix/NixOS workflow section and declarative usage example

Validation

Executed locally:

  • nix --extra-experimental-features 'nix-command flakes' flake show
  • nix --extra-experimental-features 'nix-command flakes' eval .#packages.x86_64-linux.ferrite.pname
  • nix --extra-experimental-features 'nix-command flakes' eval .#packages.aarch64-linux.ferrite.pname
  • nix --extra-experimental-features 'nix-command flakes' eval .#packages.x86_64-darwin.ferrite.pname
  • nix --extra-experimental-features 'nix-command flakes' eval .#packages.aarch64-darwin.ferrite.pname
  • nix --extra-experimental-features 'nix-command flakes' flake check --print-build-logs
  • nix --extra-experimental-features 'nix-command flakes' develop --command cargo --version

flake check successfully built Ferrite on Linux in this environment.

Closes #87

@OlaProeis OlaProeis merged commit 22b78cb into OlaProeis:master Feb 26, 2026
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.

[Feature] NixOS support

2 participants