dae973cb59
GitOrigin-RevId: c90c4025bb6e0c4eaf438128a3b2640314b1c58d
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, SystemConfiguration
|
|
, python3
|
|
, fetchpatch
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "rustpython";
|
|
version = "0.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "RustPython";
|
|
repo = "RustPython";
|
|
rev = "v${version}";
|
|
hash = "sha256-RNUOBBbq4ca9yEKNj5TZTOQW0hruWOIm/G+YCHoJ19U=";
|
|
};
|
|
|
|
cargoHash = "sha256-PYSsv/dZ3dxferTDbRLF9T8GGj9kZ3ixWNglQKtA3pE=";
|
|
|
|
patches = [
|
|
# Fix aarch64 compatibility for sqlite. Remove with the next release. https://github.com/RustPython/RustPython/pull/4499
|
|
(fetchpatch {
|
|
url = "https://github.com/RustPython/RustPython/commit/9cac89347e2276fcb309f108561e99f4be5baff2.patch";
|
|
hash = "sha256-vUPQI/5ec6/36Vdtt7/B2unPDsVrGh5iEiSMBRatxWU=";
|
|
})
|
|
];
|
|
|
|
# freeze the stdlib into the rustpython binary
|
|
cargoBuildFlags = [ "--features=freeze-stdlib" ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration ];
|
|
|
|
nativeCheckInputs = [ python3 ];
|
|
|
|
meta = with lib; {
|
|
description = "Python 3 interpreter in written Rust";
|
|
homepage = "https://rustpython.github.io";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ prusnak ];
|
|
};
|
|
}
|