diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix b/nixpkgs/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix index 6a0ee70f8635..4626f7fec37e 100644 --- a/nixpkgs/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix +++ b/nixpkgs/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix @@ -1,4 +1,4 @@ -{ lib, pkgs }: +{ lib, pkgs, stdenv }: let inherit (import ./semver.nix { inherit lib ireplace; }) satisfiesSemver; inherit (builtins) genList length; @@ -194,6 +194,23 @@ let inherit src; }; }; + + # Maps Nixpkgs CPU values to target machines known to be supported for manylinux* wheels. + # (a.k.a. `uname -m` output from CentOS 7) + # + # This is current as of manylinux2014 (PEP-0599), and is a superset of manylinux2010 / manylinux1. + # s390x is not supported in Nixpkgs, so we don't map it. + manyLinuxTargetMachines = { + x86_64 = "x86_64"; + i686 = "i686"; + aarch64 = "aarch64"; + armv7l = "armv7l"; + powerpc64 = "ppc64"; + powerpc64le = "ppc64le"; + }; + + # Machine tag for our target platform (if available) + targetMachine = manyLinuxTargetMachines.${stdenv.targetPlatform.parsed.cpu.name} or null; in { inherit @@ -207,5 +224,6 @@ in cleanPythonSources moduleName getPythonVersion + targetMachine ; } |