Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/jolt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
let
commonArgs = rec {
pname = "jolt";
version = "unstable-2024-12-18";
version = "unstable-2025-02-12";

nativeBuildInputs = [
pkg-config
Expand All @@ -26,8 +26,8 @@ let
src = fetchFromGitHub {
owner = "a16z";
repo = "jolt";
rev = "f1e5ab3cb2f55eb49c17c249039294184d27fdba";
hash = "sha256-yr+JzZ3GIbwncEzfcrDmfxzph3YAI8dNLxcCXWT8520=";
rev = "783da5d32010e707f85085d59ae0451f6d8a6b25";
hash = "sha256-G+27L6L7XpuEg2XUrhgsHnW/61Jwye1a4rcXorRxviU=";
fetchSubmodules = true;
};
};
Expand Down
6 changes: 3 additions & 3 deletions packages/nexus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
let
commonArgs = rec {
pname = "Nexus-zkVM";
version = "unstable-2024-12-18";
version = "unstable-2025-01-08";

nativeBuildInputs = [
pkg-config
Expand All @@ -25,8 +25,8 @@ let
src = fetchFromGitHub {
owner = "nexus-xyz";
repo = "nexus-zkvm";
rev = "315938cfd29d66ddfa7526d793f63b8b114d09e8";
hash = "sha256-lXptNVcbECefrn67X92feV3l6F9+fWZpeMCQglyBVJA=";
rev = "f594536f6fede8ceaf5d8c017a6f6fa2fbea3475";
hash = "sha256-7jBZB/PAIsFSTrZOHX+0N7zM7/skI7yMsnOJCkXDV1o=";
};
};

Expand Down
9 changes: 7 additions & 2 deletions packages/risc0-rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ stdenv.mkDerivation rec {

installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ./* $out/

mkdir -p "$out"
cp -r ./* "$out/"

mkdir -p "$out/r0.${version}-risc0-rust-x86_64-unknown-linux-gnu"
cp -r ./* "$out/r0.${version}-risc0-rust-x86_64-unknown-linux-gnu"

runHook postInstall
'';

Expand Down
23 changes: 15 additions & 8 deletions packages/risc0/default.nix
Original file line number Diff line number Diff line change
@@ -1,45 +1,53 @@
{
risc0-rust,
rust-bin,
craneLib-nightly,
fetchurl,
fetchFromGitHub,
fetchGitHubFile,
installSourceAndCargo,
autoPatchelfHook,
pkg-config,
openssl,
stdenv,
...
}:
let
# Value from "SHA256_HASH" constant here:
# https://github.com/risc0/risc0/blob/main/risc0/circuit/recursion/build.rs
recursion-zkr =
let
hash' = "ffc503386276f809137161f18d2f3ddcba3bb4b2d8b5d893b2c5d94b35afaf47";
hash' = "4c67e5fe48c6db03df9518911067685542fecf0a54d5c6e3efd16e943c62a2cf";
in
fetchurl rec {
url = "https://risc0-artifacts.s3.us-west-2.amazonaws.com/zkr/${hash'}.zip";
hash = "sha256-/8UDOGJ2+AkTcWHxjS893Lo7tLLYtdiTssXZSzWvr0c=";
hash = "sha256-TGfl/kjG2wPflRiREGdoVUL+zwpU1cbj79FulDxios8=";
};

commonArgs = rec {
pname = "risc0";
version = "unstable-2024-12-21";
version = "unstable-2025-02-14";

nativeBuildInputs = [
autoPatchelfHook
pkg-config
openssl
stdenv.cc.cc.lib
];

src = fetchFromGitHub {
owner = "risc0";
repo = "risc0";
rev = "3e042891fbad365fb1db7b17bd4afbb5e6fea99e";
hash = "sha256-wX8d44eGq1VxWMAduqPs8IMRMhcKcLuKKFhnRSQZeBc=";
rev = "0181c41119cf14e3f0f302e5ede1f20f6a1f81ce";
hash = "sha256-BbTB00HtIFOChShirHXLjZoCd1jHlcCv4M4XsCB1TCA=";
};
};

rust-toolchain = risc0-rust;
rust-toolchain = rust-bin.fromRustupToolchainFile (fetchGitHubFile {
inherit (commonArgs.src) owner repo rev;
file = "rust-toolchain.toml";
hash = "sha256-n7Jr8rkovVQ98/KNvSg9EG9JZmKWD7DTaXTbpDJKA0Q=";
});
craneLib = craneLib-nightly.overrideToolchain rust-toolchain;
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
in
Expand All @@ -52,8 +60,7 @@ craneLib.buildPackage (
postPatch = ''
# Replace usages of `Command::new("rustup")` with the correct value
# which should be used
sed -i '82,89d;90ilet path_raw = Some("${rust-toolchain}");' risc0/cargo-risczero/src/toolchain.rs
sed -i '410,417d;663,681d;418ilet rustc = "${rust-toolchain}/bin/rustc";' risc0/build/src/lib.rs
sed -i '27d;28iPathBuf::from(r"${risc0-rust}")' rzup/src/paths.rs
# Fix starter template
sed -i 's|{{ risc0_build }}|path = "'$out'"|' risc0/cargo-risczero/templates/rust-starter/methods/Cargo-toml
sed -i 's|{{ risc0_zkvm }}|path = "'$out'"|' risc0/cargo-risczero/templates/rust-starter/host/Cargo-toml
Expand Down
6 changes: 3 additions & 3 deletions packages/sp1/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let
commonArgs = rec {
pname = "sp1";
version = "unstable-2024-12-23";
version = "unstable-2025-02-09";

nativeBuildInputs = [
pkg-config
Expand All @@ -20,8 +20,8 @@ let
src = fetchFromGitHub {
owner = "succinctlabs";
repo = "sp1";
rev = "bfb0c6d8e045b5f40422b9c06cb0e9ee21b3c19c";
hash = "sha256-gPSjsN0ixoP240ovGfahqRPOsuHFlXwfiVu48KrM4Xs=";
rev = "f4f9fb42332d9cd7371933dd18d1e2e0eef44429";
hash = "sha256-sX3E3uKGlm0vTLtGcHvo7AQIIPxVX1CSkeOaCyHIhDA=";
fetchSubmodules = true;
};
};
Expand Down
6 changes: 3 additions & 3 deletions packages/zkm-rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
...
}:
stdenv.mkDerivation rec {
name = "risc0-rust";
version = "20241217";
name = "zkm-rust";
version = "20250108";

nativeBuildInputs = [
autoPatchelfHook
Expand All @@ -29,6 +29,6 @@ stdenv.mkDerivation rec {
repo = "toolchain";
tag = "${version}";
asset = "rust-toolchain-x86-64-unknown-linux-gnu-${version}.tar.xz";
hash = "sha256-XgR+nR5JwqGJ6Rx4cz65N2LTmGZDhBZ9ulXTIn5lW/Q=";
hash = "sha256-lPSAKd9eolXBd32sXB9qhs+fUPJLJ5QROG6P3wS5uik=";
};
}
Loading