build: modernize Nix base to nixos-25.11 and uv#308
Closed
miketheman wants to merge 3 commits into
Closed
Conversation
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>
See https://github.com/nix-community/nixpkgs-fmt#nixpkgs-fmt---nix-code-formatter-for-nixpkgs Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Closed
Collaborator
|
Oh, this is perfect, I can take it from here! |
Collaborator
|
Continued in #309. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.