From 35aded3ced0eb7a6d8982f63a9eeed54dacd9adb Mon Sep 17 00:00:00 2001 From: cameronfyfe Date: Sun, 7 May 2023 03:50:08 -0600 Subject: [PATCH] cargo-risczero: init at 0.14.0 --- .../tools/rust/cargo-risczero/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/tools/rust/cargo-risczero/default.nix diff --git a/pkgs/development/tools/rust/cargo-risczero/default.nix b/pkgs/development/tools/rust/cargo-risczero/default.nix new file mode 100644 index 000000000000..2f50f62aab90 --- /dev/null +++ b/pkgs/development/tools/rust/cargo-risczero/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchCrate +, rustPlatform +, pkg-config +, openssl +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "cargo-risczero"; + version = "0.14.0"; + + src = fetchCrate { + inherit pname version; + sha256 = "sha256-uZz0jJ3klaOrqzJ0BUVDHxl7lv6vt0GT6RgQuJeyeyk="; + }; + + cargoSha256 = "sha256-t++3+Ijn1ykjMcMsdoe/1xfaji+DQvhyiFe6M/Bpbt0="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + # The tests require network access which is not available in sandboxed Nix builds. + doCheck = false; + + meta = with lib; { + description = "Cargo extension to help create, manage, and test RISC Zero projects."; + homepage = "https://risczero.com"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ cameronfyfe ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b050faebb4cf..046fb1c8a7ac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16127,6 +16127,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; cargo-readme = callPackage ../development/tools/rust/cargo-readme { }; + cargo-risczero = callPackage ../development/tools/rust/cargo-risczero { }; cargo-semver-checks = callPackage ../development/tools/rust/cargo-semver-checks { }; cargo-show-asm = callPackage ../development/tools/rust/cargo-show-asm { };