Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 46 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 rustPlatform, 5 fetchFromGitHub, 6 SystemConfiguration, 7 python3, 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "rustpython"; 12 version = "0.4.0"; 13 14 src = fetchFromGitHub { 15 owner = "RustPython"; 16 repo = "RustPython"; 17 rev = "refs/tags/${version}"; 18 hash = "sha256-BYYqvPJu/eFJ9lt07A0p7pd8pGFccUe/okFqGEObhY4="; 19 }; 20 21 cargoLock = { 22 lockFile = ./Cargo.lock; 23 outputHashes = { 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.hostPlatform.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.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; 45 }; 46}