Skip to content

Add Nix flake for ergonomic NixOS development - #253

Draft
alxmrs wants to merge 1 commit into
mainfrom
nixos-dev-shell
Draft

alxmrs wants to merge 1 commit into
mainfrom
nixos-dev-shell

Conversation

@alxmrs

@alxmrs alxmrs commented Sep 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds flake.nix (+ flake.lock) providing a devShell with uv, a matching Python interpreter, and a Rust toolchain, plus the shared libraries (libstdc++, zlib, openssl) compiled Python wheels (pyarrow, duckdb, polars, ...) need at runtime that NixOS doesn't expose on a standard FHS path.
  • Adds .envrc (use flake) so the shell auto-loads via direnv only when inside this project directory, and unloads on leaving it — no global system changes.
  • Documents both the direnv and manual nix develop paths in CONTRIBUTING.md.
  • Gitignores .direnv/ (direnv's local, machine-specific cache).

Test plan

  • nix develop enters cleanly, providing uv, python3 (3.11), rustc, cargo, pkg-config
  • uv sync --dev --no-install-package xarray-sql succeeds inside the shell
  • uv run --no-project maturin develop --uv compiles the Rust extension successfully
  • uv run --no-project pytest -v . -m "not integration" passes (359 passed, 1 skipped)

🤖 Generated with Claude Code

Provides uv, a matching Python interpreter, and a Rust toolchain via
a devShell, plus the shared libraries (libstdc++, zlib, openssl) that
compiled Python wheels (pyarrow, duckdb, polars, ...) need at runtime
but that NixOS doesn't put on a standard FHS path. Scoped to this
project only via .envrc/direnv; verified end-to-end with uv sync,
maturin develop, and the full pytest suite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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