Commit 2b43490 authored and committed Jan 19, 2023
1 parent 29aecf0 commit 2b43490 Copy full SHA for 2b43490
File tree 1 file changed +16
-5
lines changed
pkgs/development/interpreters/python/cpython
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -171,11 +171,22 @@ let
171
171
else if isx86_32 then "i386"
172
172
else parsed . cpu . name ;
173
173
pythonAbiName =
174
- # python's build doesn't differentiate between musl and glibc in its
175
- # abi detection, our wrapper should match.
176
- if stdenv . hostPlatform . isMusl then
177
- replaceStrings [ "musl" ] [ "gnu" ] parsed . abi . name
178
- else parsed . abi . name ;
174
+ # python's build doesn't support every gnu<extension>, and doesn't
175
+ # differentiate between musl and glibc, so we list those supported in
176
+ # here:
177
+ # https://github.com/python/cpython/blob/e488e300f5c01289c10906c2e53a8e43d6de32d8/configure.ac#L724
178
+ # Note: this is an approximation, as it doesn't take into account the CPU
179
+ # family, or the nixpkgs abi naming conventions.
180
+ if elem parsed . abi . name [
181
+ "gnux32"
182
+ "gnueabihf"
183
+ "gnueabi"
184
+ "gnuabin32"
185
+ "gnuabi64"
186
+ "gnuspe"
187
+ ]
188
+ then parsed . abi . name
189
+ else "gnu" ;
179
190
multiarch =
180
191
if isDarwin then "darwin"
181
192
else "${ multiarchCpu } -${ parsed . kernel . name } -${ pythonAbiName } " ;
You can’t perform that action at this time.
0 commit comments