Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 54 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchCrate, 5 fetchurl, 6 rustPlatform, 7 pkg-config, 8 openssl, 9 nix-update-script, 10}: 11 12rustPlatform.buildRustPackage rec { 13 pname = "cargo-risczero"; 14 version = "1.1.2"; 15 16 src = fetchCrate { 17 inherit pname version; 18 hash = "sha256-YZ3yhj1VLxl3Fg/yWhqrZXxIQ7oK6Gdo0NU39oDvoo8="; 19 }; 20 21 src-recursion-hash = "28e4eeff7a8f73d27408d99a1e3e8842c79a5f4353e5117ec0b7ffaa7c193612"; # That is from cargoDeps/risc0-circuit-recursion/build.rs 22 23 src-recursion = fetchurl { 24 url = "https://risc0-artifacts.s3.us-west-2.amazonaws.com/zkr/${src-recursion-hash}.zip"; 25 hash = "sha256-KOTu/3qPc9J0CNmaHj6IQseaX0NT5RF+wLf/qnwZNhI="; # This hash should be the same as src-recuresion-hash 26 }; 27 28 env = { 29 RECURSION_SRC_PATH = src-recursion; 30 }; 31 32 cargoHash = "sha256-r2bs1MT2jBK4ATUKyRGLEAFCHNaGnnQ4jbQOKbQbldY="; 33 34 nativeBuildInputs = [ 35 pkg-config 36 ]; 37 38 buildInputs = [ 39 openssl 40 ]; 41 42 # The tests require network access which is not available in sandboxed Nix builds. 43 doCheck = false; 44 45 passthru.updateScript = nix-update-script { }; 46 47 meta = { 48 description = "Cargo extension to help create, manage, and test RISC Zero projects"; 49 mainProgram = "cargo-risczero"; 50 homepage = "https://risczero.com"; 51 license = with lib.licenses; [ asl20 ]; 52 maintainers = with lib.maintainers; [ cameronfyfe ]; 53 }; 54}