Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 python3, 6 versionCheckHook, 7 nix-update-script, 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "rustpython"; 12 version = "0.4.0"; 13 14 src = fetchFromGitHub { 15 owner = "RustPython"; 16 repo = "RustPython"; 17 tag = version; 18 hash = "sha256-BYYqvPJu/eFJ9lt07A0p7pd8pGFccUe/okFqGEObhY4="; 19 }; 20 21 cargoHash = "sha256-LuxET01n5drYmPXXhCl0Cs9yoCQKwWah8FWfmKmLdsg="; 22 23 # freeze the stdlib into the rustpython binary 24 cargoBuildFlags = [ "--features=freeze-stdlib" ]; 25 26 nativeCheckInputs = [ python3 ]; 27 28 nativeInstallCheckInputs = [ 29 versionCheckHook 30 ]; 31 versionCheckProgramArg = "--version"; 32 doInstallCheck = true; 33 34 passthru = { 35 updateScript = nix-update-script { }; 36 }; 37 38 meta = { 39 description = "Python 3 interpreter in written Rust"; 40 homepage = "https://rustpython.github.io"; 41 license = lib.licenses.mit; 42 maintainers = with lib.maintainers; [ prusnak ]; 43 mainProgram = "rustpython"; 44 }; 45}