Skip to content

build: modernize Nix base to nixos-25.11 and uv#308

Closed
miketheman wants to merge 3 commits into
Pylons:mainfrom
miketheman:nix-modernize-explore
Closed

build: modernize Nix base to nixos-25.11 and uv#308
miketheman wants to merge 3 commits into
Pylons:mainfrom
miketheman:nix-modernize-explore

Conversation

@miketheman

Copy link
Copy Markdown
Collaborator

Modernize the nix environment and replace poetry2nix with uv

This probably isn't 100% complete but I wanted to share what I had so far.

Bump the pinned nixpkgs from nixos-23.11 (2024) to nixos-25.11 and
poetry2nix to a current revision. 25.11 still ships python310 natively, so
both the 3.12 and 3.10 poetry2nix dev environments build without extra
inputs.

Adjust for nixpkgs changes: gitAndTools.pre-commit -> top-level pre-commit
(+ git), and add a types-typed-ast placeholder override (25.11 removed
the package poetry2nix's mypy override references; mypy is a wheel here
so it is unused).

This is an isolated stepping stone toward removing poetry2nix: a current
Nix base whose poetry2nix understands riscv64, which later lets the
mypy<1.19 pin be dropped and the project move to uv.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Replace poetry2nix with a plain nix-shell toolchain: nixos-25.11 provides
python 3.10/3.12 + uv 0.9.30 + pre-commit + nixpkgs-fmt, and uv manages
dependencies (uv.lock) directly. pyproject.toml moves to PEP 621 + PEP 735
dependency-groups with the uv_build backend; Makefile drives tools via
uv run. Remove poetry.lock, poetry.toml, and the py310/ duplicate project.

Dropping poetry2nix also removes the riscv64 wheel-eval limitation, so mypy
is no longer pinned (<1.19) and resolves to current (2.1.0).

Validated in a nixos VM: nix-shell provides uv 0.9.30; `make tests` (lint +
types + unit, 100% coverage) passes on Python 3.12, and the minimum-version
floor (openapi-core 0.19.1 / pyramid 1.10.7) plus examples pass on 3.10.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman requested a review from zupo June 8, 2026 11:58
@miketheman miketheman mentioned this pull request Jun 8, 2026
@zupo

zupo commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Oh, this is perfect, I can take it from here!

@zupo

zupo commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Continued in #309.

@zupo zupo closed this Jun 9, 2026
@miketheman miketheman deleted the nix-modernize-explore branch June 9, 2026 22:46
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.

2 participants