Fix platform_python_implementation field

This commit is contained in:
adisbladis 2020-01-22 18:32:39 +00:00
parent 145fc6ce83
commit 82166c8a49
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -93,10 +93,14 @@ let
else throw "Unsupported platform"
);
platform_machine = stdenv.platform.kernelArch;
platform_python_implementation = {
cpython = "CPython";
pypy = "PyPy";
}."${python.passthru.implementation}" or throw "Unsupported implementation ${python.passthru.implementation}";
platform_python_implementation = let
impl = python.passthru.implementation;
in
(
if impl == "cpython" then "CPython"
else if impl == "pypy" then "PyPy"
else throw "Unsupported implementation ${impl}"
);
platform_release = ""; # Field not reproducible
platform_system = (
if stdenv.isLinux then "Linux"