File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 294294 condition = version : versionInBetween version "3.12" "3.11" ;
295295 override = filterOutPatch "f4b31edf2d9d72878dab1f66a36913b5bcc848ec.patch" ;
296296 }
297+ {
298+ # Older releases define knownfiles at module level. Nixpkgs' current
299+ # mimetypes.patch targets the non-Windows branch, which only exists
300+ # in these maintenance releases and newer.
301+ condition =
302+ version :
303+ versionInBetween version "3.11.18" "3.0"
304+ || versionInBetween version "3.12.16" "3.12"
305+ || versionInBetween version "3.13.18" "3.13"
306+ || versionInBetween version "3.14.9" "3.14"
307+ || versionInBetween version "3.15.1" "3.15" ;
308+ override = replacePatch "mimetypes.patch" ./patches/3.11.17-mimetypes.patch ;
309+ }
297310 {
298311 # CPython moved knownfiles into a non-Windows branch in these maintenance releases.
299312 condition =
Original file line number Diff line number Diff line change 1+ diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
2+ --- a/Lib/mimetypes.py
3+ +++ b/Lib/mimetypes.py
4+ @@ -49,11 +49,3 @@
5+ knownfiles = [
6+ - "/etc/mime.types",
7+ - "/etc/httpd/mime.types", # Mac OS X
8+ - "/etc/httpd/conf/mime.types", # Apache
9+ - "/etc/apache/mime.types", # Apache 1
10+ - "/etc/apache2/mime.types", # Apache 2
11+ - "/usr/local/etc/httpd/conf/mime.types",
12+ - "/usr/local/lib/netscape/mime.types",
13+ - "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2
14+ - "/usr/local/etc/mime.types", # Apache 1.3
15+ + "@mime-types@/etc/mime.types",
16+ ]
You can’t perform that action at this time.
0 commit comments