diff --git a/README.md b/README.md index 6c7cef1..d5a6f36 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ Nim implementation of the e2e reliability protocol. ## Quick start ```bash +# Initialize vendored dependencies (run once after clone) +nix run '.#setup' + # Build the shared library nix build '.?submodules=1#libsds' diff --git a/flake.nix b/flake.nix index b2a930b..e090e5c 100644 --- a/flake.nix +++ b/flake.nix @@ -71,8 +71,17 @@ default = pkgsFor.${system}.callPackage ./nix/shell.nix {}; }); - # nix run '.#clean' — garbage-collect the Nix store apps = forAllSystems (system: { + # nix run '.#setup' — initialize git submodules (run once after clone) + setup = { + type = "app"; + program = toString (pkgsFor.${system}.writeShellScript "nix-setup" '' + echo "Initializing git submodules..." + git submodule update --init --recursive + echo "Done. You can now run: nix build '.?submodules=1#libsds'" + ''); + }; + # nix run '.#clean' — garbage-collect the Nix store clean = { type = "app"; program = toString (pkgsFor.${system}.writeShellScript "nix-clean" ''