pythonInterpreters.pypy27_prebuilt: add support for aarch64-linux

This commit is contained in:
Thiago Kenji Okada 2023-01-04 22:49:37 +00:00
parent be456598db
commit a49d01ce3f
2 changed files with 11 additions and 3 deletions

View file

@ -293,7 +293,10 @@ in {
patch = "11";
};
sha256 = "sha256-uo7ZWKkFwHNaTP/yh1wlCJlU3AIOCH2YKw/6W52jFs0="; # linux64
sha256 = {
aarch64-linux = "sha256-6pJNod7+kyXvdg4oiwT5hGFOQFWA9TIetqXI9Tm9QVo=";
x86_64-linux = "sha256-uo7ZWKkFwHNaTP/yh1wlCJlU3AIOCH2YKw/6W52jFs0=";
}.${stdenv.system};
pythonVersion = "2.7";
inherit passthruFun;
};

View file

@ -55,11 +55,16 @@ let
tk-8_5
];
downloadUrls = {
aarch64-linux = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-aarch64.tar.bz2";
x86_64-linux = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-linux64.tar.bz2";
};
in with passthru; stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://downloads.python.org/pypy/pypy${pythonVersion}-v${version}-linux64.tar.bz2";
url = downloadUrls.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
inherit sha256;
};
@ -124,7 +129,7 @@ in with passthru; stdenv.mkDerivation {
homepage = "http://pypy.org/";
description = "Fast, compliant alternative implementation of the Python language (${pythonVersion})";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
platforms = lib.mapAttrsToList (arch: _: arch) downloadUrls;
};
}