diff --git a/docs/markdown/Contributions/development/contributor-setup.md b/docs/markdown/Contributions/development/contributor-setup.md index a12a5b91a87..b3f3b433026 100644 --- a/docs/markdown/Contributions/development/contributor-setup.md +++ b/docs/markdown/Contributions/development/contributor-setup.md @@ -26,6 +26,10 @@ We use the popular forking workflow typically used by open source projects. See Step 2: Bootstrap the Rust engine --------------------------------- +Pants requires several dependencies to be installed: a Python 3.9 interpreter, Rust, the protobuf compiler, clang and others. There is experimental support for the Nix package manager that makes it easy to set up a dev environment. Follow the instructions on the [Nix website](https://nixos.org/download.html) to install Nix. Then `cd` into the directory where you cloned the Pants repo and type `nix-shell`. This will download all the necessary dependencies and start a shell with a suitably configured PATH variable to make them available for use. + +Alternatively, you can install the dependencies manually as follows: + Pants uses Rustup to install Rust. Run the command from to install Rustup; ensure that `rustup` is on your `$PATH`. If your system Python is not the version Pants expects (currently Python 3.9), you'll need to provide one. Python interpreters from Linux or Mac distributions sometimes have quirks that can cause headaches with bootstrapping the dev venv. Some examples of Pythons that work well with Pants are those provided by: diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000000..04f44c2a0ff --- /dev/null +++ b/shell.nix @@ -0,0 +1,11 @@ +{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/23.05.tar.gz") {} }: + +pkgs.mkShell { + packages = with pkgs; [ + curl + git + python39 + rustup + protobuf + ]; +}