In the README, recommend a git url (#343)

* In the README, recommend a git url

* More comprehensive self-build instructions
This commit is contained in:
Ana Hobden 2023-03-16 09:24:13 -07:00 committed by GitHub
parent f98fbbac1c
commit df0d8eb01f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,13 +257,25 @@ Since you'll be using `nix-installer` to install Nix on systems without Nix, the
Build a portable Linux binary on a system with Nix:
```bash
# to build a local copy
nix build -L .#nix-installer-static
# to build the remote main development branch
nix build -L github:determinatesystems/nix-installer#nix-installer-static
# for a specific version of the installer:
export NIX_INSTALLER_TAG="v0.5.0"
nix build -L github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer-static
```
On Mac:
```bash
# to build a local copy
nix build -L .#nix-installer
# to build the remote main development branch
nix build -L github:determinatesystems/nix-installer#nix-installer
# for a specific version of the installer:
export NIX_INSTALLER_TAG="v0.5.0"
nix build -L github:determinatesystems/nix-installer/$NIX_INSTALLER_TAG#nix-installer
```
Then copy the `result/bin/nix-installer` to the machine you wish to run it on.
@ -271,7 +283,14 @@ Then copy the `result/bin/nix-installer` to the machine you wish to run it on.
You can also add `nix-installer` to a system without Nix via `cargo`:
```bash
RUSTFLAGS="--cfg tokio_unstable" cargo install nix-installer
# to build and run a local copy
RUSTFLAGS="--cfg tokio_unstable" cargo run -- --help
# to build the remote main development branch
RUSTFLAGS="--cfg tokio_unstable" cargo install --git https://github.com/DeterminateSystems/nix-installer
nix-installer --help
# for a specific version of the installer:
export NIX_INSTALLER_TAG="v0.5.0"
RUSTFLAGS="--cfg tokio_unstable" cargo install --git https://github.com/DeterminateSystems/nix-installer --tag $NIX_INSTALLER_TAG
nix-installer --help
```