2021-12-19 01:06:50 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, SystemConfiguration
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rustpython";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "unstable-2022-10-11";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RustPython";
|
|
|
|
repo = "RustPython";
|
2022-10-21 18:38:19 +00:00
|
|
|
rev = "273ffd969ca6536df06d9f69076c2badb86f8f8c";
|
|
|
|
sha256 = "sha256-t/3++EeP7a8t2H0IEPLogBri7+6u+2+v+lNb4/Ty1/w=";
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
cargoHash = "sha256-Pv7SK64+eoK1VUxDh1oH0g1veWoIvBhiZE9JI/alXJ4=";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
# freeze the stdlib into the rustpython binary
|
2022-10-30 15:09:59 +00:00
|
|
|
cargoBuildFlags = [ "--features=freeze-stdlib" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ python3 ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python 3 interpreter in written Rust";
|
|
|
|
homepage = "https://rustpython.github.io";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|