From 5c38abe5727e004788049fc5d23f7e090cafd475 Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Tue, 23 Jul 2024 16:44:54 -0700 Subject: [PATCH] feat: use tabs in dev env docs Trying out the tabs feature of nextra [0], to organize the per-platform install docs. [0] https://nextra.site/docs/guide/built-ins/tabs --- pages/dev/{dev-env.md => dev-env.mdx} | 41 ++++++++++++++++++--------- 1 file changed, 27 insertions(+), 14 deletions(-) rename pages/dev/{dev-env.md => dev-env.mdx} (85%) diff --git a/pages/dev/dev-env.md b/pages/dev/dev-env.mdx similarity index 85% rename from pages/dev/dev-env.md rename to pages/dev/dev-env.mdx index 0379c34..6d39ba1 100644 --- a/pages/dev/dev-env.md +++ b/pages/dev/dev-env.mdx @@ -8,40 +8,53 @@ Nix, and instead configure your environment manually, see the docs on You'll need `git` and `git-lfs` to clone the Penumbra protocol repository. Install these via your package manager of choice: -```bash -# for macos -brew install git-lfs -# for linux debian/ubuntu -sudo apt install -y git-lfs -# for linux fedora -sudo dnf install -y git-lfs -``` +import { Tabs } from 'nextra/components'; + + + + ```shell + brew install git-lfs + ``` + + + + ```shell + sudo apt install -y git-lfs + ``` + + + + ```shell + sudo dnf install -y git-lfs + ``` + + Then, for all platforms, make sure to run `git lfs install`. Now you're ready to clone the Penumbra protocol repo: -``` +```shell git clone https://github.com/penumbra-zone/penumbra ``` ## Using `nix develop` for project dependencies - +*/} Install [Nix]. After restarting your shell, create a config file to enable Nix flakes: -``` +```shell mkdir -p ~/.config/nix echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf ``` Now hop into the Penumbra directory and activate the env: -``` +```shell cd penumbra nix develop ``` @@ -56,7 +69,7 @@ You can run `exit` to return to your normal shell, without those tools, which ha If you use [direnv], you can copy the example `.envrc` file to automatically activate the Penumbra nix environment when you cd to the repository: -``` +```shell cp .envrc.example .envrc direnv allow ```