Repository navigation
fix: replace mimetypes.patch for wrapped knownfiles layout - #7
Merged
Merged
Conversation
CPython 3.14.9+ (and 3.11.18+/3.12.16+/3.13.18+/3.15.x) wrap the `knownfiles` list in Lib/mimetypes.py in an `if sys.platform == "win32"` branch, so nixpkgs' mimetypes.patch (targeting the old flat layout) fails to apply: applying patch .../mimetypes.patch patching file Lib/mimetypes.py Hunk #1 FAILED at 40. This breaks building every 3.14.9+ release, i.e. the current `latest."3.14"` alias (3.14.10), with any nixpkgs rev. Add a replacement patch matching the wrapped layout (still emitting the @mime-types@ marker that nixpkgs substitutes with --replace-fail) and apply it via the existing replacePatch override machinery for all affected versions.
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.
Problem
CPython 3.14.9+ (and 3.11.18+/3.12.16+/3.13.18+/3.15.x) wrap the
knownfileslist inLib/mimetypes.pyin anif sys.platform == "win32"branch. nixpkgs'mimetypes.patchtargets the old flat layout, so it fails to apply:This makes every 3.14.9+ build fail — including the
latest."3.14"alias (currently 3.14.10) and exact pins like 3.14.9 — with any nixpkgs rev (verified againstb6018f87,674a2028, master). The same applies to the currentlatestaliases 3.11.18, 3.12.16, 3.13.18 and 3.15.2.Fix
patches/mimetypes-wrapped.patch: same transformation as nixpkgs'mimetypes.patch, but matching the wrapped layout. It still emits the@mime-types@marker that nixpkgs'substituteInPlace --replace-failrequires (so a plainfilterOutPatchwould not work).replacePatchmachinery, applied to all affected versions (3.11.18 <= version < 3.16).Verification
Built successfully with the patched flake (using devenv's nixpkgs input,
github:cachix/devenv-nixpkgs/d97234e5→ nixpkgs-src674a2028):packages.x86_64-linux."3.14.9"packages.x86_64-linux."3.14.10"