Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@
condition = version: versionInBetween version "3.15" "3.14.5";
override = filterOutPatch "hacl-static-ldeps-for-static-modules.patch";
}
{
# CPython 3.11.18+/3.12.16+/3.13.18+/3.14.9+/3.15.x wrap the
# `knownfiles` list in an `if sys.platform == "win32"` branch, so
# nixpkgs' mimetypes.patch (flat-list layout) fails to apply.
# Use a replacement patch matching the wrapped layout.
condition = version: versionInBetween version "3.16" "3.11.18";
override = replacePatch "mimetypes.patch" ./patches/mimetypes-wrapped.patch;
}
];
callPackage = pkgs.newScope {
inherit python;
Expand Down
19 changes: 19 additions & 0 deletions patches/mimetypes-wrapped.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git i/Lib/mimetypes.py w/Lib/mimetypes.py
index f3343c8..ab5b886 100644
--- i/Lib/mimetypes.py
+++ w/Lib/mimetypes.py
@@ -51,12 +51,4 @@
else:
knownfiles = [
- "/etc/mime.types",
- "/etc/httpd/mime.types", # Mac OS X
- "/etc/httpd/conf/mime.types", # Apache
- "/etc/apache/mime.types", # Apache 1
- "/etc/apache2/mime.types", # Apache 2
- "/usr/local/etc/httpd/conf/mime.types",
- "/usr/local/lib/netscape/mime.types",
- "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2
- "/usr/local/etc/mime.types", # Apache 1.3
- ]
+ "@mime-types@",
+ ]
Loading