diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4715c51..8f0126a 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -40,3 +40,15 @@ jobs: - name: r0vm if: matrix.os == 'macos-latest' run: nix build -L --no-link --show-trace .#packages.x86_64-darwin.r0vm + + - name: template + if: matrix.os == 'ubuntu-latest' + run: | + git config --global init.defaultBranch main + ./scripts/use-template.sh + + - name: template + if: matrix.os == 'macos-latest' + run: | + git config --global init.defaultBranch main + ./scripts/use-template.sh diff --git a/README.md b/README.md index 2432a5b..9f75a11 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # risc0pkgs - Nixified [RISC Zero](https://www.risczero.com/) Packages +`risc0pkgs` contains risc0 related packages like `r0vm` and risc0's `rustc` fork packaged with Nix. Moreover, it provides a helper function: `buildRisc0Package`, which you can use to package your risc0 project. The following section describes how to set up a risc0 project from scratch. + ## Getting Started It's recommended to get started by initializing your project using the default template: @@ -13,11 +15,9 @@ nix flake init -t github:cspr-rad/risc0pkgs git init git add -A -nix build .#risc0prover +nix build .#risc0package ``` -Note: Change the `system` to `aarch64-darwin` if you're on macOS. - If you want to integrate `risc0` into your existing flake, see `./templates/default/flake.nix`. ## Development Shell diff --git a/scripts/use-template.sh b/scripts/use-template.sh new file mode 100755 index 0000000..b77e41b --- /dev/null +++ b/scripts/use-template.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +mkdir risc0-workspace +cd risc0-workspace + +nix flake init -t github:cspr-rad/risc0pkgs + +git init +git add -A + +nix build .#risc0package