1{ lib 2, stdenv 3, rustPlatform 4, fetchFromGitHub 5, SystemConfiguration 6, python3 7}: 8 9rustPlatform.buildRustPackage rec { 10 pname = "rustpython"; 11 version = "0.3.1"; 12 13 src = fetchFromGitHub { 14 owner = "RustPython"; 15 repo = "RustPython"; 16 rev = "refs/tags/${version}"; 17 hash = "sha256-AtIaWwE1pEIP1SJN9dYgHRP1GX4LTmetIPztHbsBXto="; 18 }; 19 20 cargoLock = { 21 lockFile = ./Cargo.lock; 22 outputHashes = { 23 "rustpython-ast-0.3.1" = "sha256-dT0x4E8k/FcSP/q0uwwBWniT1n9HGmFF/HV6hAE6bGU="; 24 "rustpython-doc-0.3.0" = "sha256-34ERuLFKzUD9Xmf1zlafe42GLWZfUlw17ejf/NN6yH4="; 25 }; 26 }; 27 28 # freeze the stdlib into the rustpython binary 29 cargoBuildFlags = [ "--features=freeze-stdlib" ]; 30 31 buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration ]; 32 33 nativeCheckInputs = [ python3 ]; 34 35 meta = with lib; { 36 description = "Python 3 interpreter in written Rust"; 37 homepage = "https://rustpython.github.io"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ prusnak ]; 40 # = note: Undefined symbols for architecture x86_64: 41 # "_utimensat", referenced from: 42 # rustpython_vm::function::builtin::IntoPyNativeFn::into_func::... in 43 # rustpython-10386d81555652a7.rustpython_vm-f0b5bedfcf056d0b.rustpython_vm.7926b68e665728ca-cgu.08.rcgu.o.rcgu.o 44 broken = stdenv.isDarwin && stdenv.isx86_64; 45 }; 46}