Your first flake
Adds a `flake.nix` so the project can be built, tested and checked with Nix (and run on NixCI).
The **entire test suite runs inside `nix flake check`** — pure builds for everything offline,
and the pure-impure trick for the few tests that need real internet.
It provides:
* `packages.default` — builds the dspy wheel (`python -m build`).
* `packages.test-env` — the full test virtualenv, resolved from `uv.lock` via uv2nix.
* `devShells.default` — python + uv + ruff + pre-commit development environment.
* `checks`:
* `lint` — ruff gate mirroring the existing CI.
* `pytest` — the offline test suite (984 tests), a fully reproducible pure build.
* `pytestNetwork` — the ~9 internet-dependent tests, run via the pure-impure trick
(a fixed-output derivation, which Nix grants network access), so they execute inside
`nix flake check` too. Duplicated, not depended upon, from NorfairKing/pure-impure-nix.
* the wheel, the devShell and the test-env.
Passing NixCI: https://staging.nix-ci.com/gh:NorfairKing:dspy/your-first-flake/337102c80d8f5839bc6ebad3bf8d053f5b9e7139