nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

README.md: NIX_INSTALLER_TARBALL_PATH needs to be set for "RUSTFLAGS="--cfg tokio_unstable" cargo run -- --help"

Open kastl-ars opened this issue 7 months ago • 0 comments

RUSTFLAGS="--cfg tokio_unstable" cargo run -- --help

https://github.com/DeterminateSystems/nix-installer/blob/c5471f6dcb2853d6b297dd4249f209d55a37f424/README.md?plain=1#L355

This does not work when testing on a fresh system, as the NIX_INSTALLER_TARBALL_PATH needs to be set.

   Compiling nix-installer v0.20.1 (/home/vagrant/nix-installer)
error: environment variable `NIX_INSTALLER_TARBALL_PATH` not defined at compile time
  --> src/settings.rs:16:36
   |
16 | pub const NIX_TARBALL_PATH: &str = env!("NIX_INSTALLER_TARBALL_PATH");
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use `std::env::var("NIX_INSTALLER_TARBALL_PATH")` to read the variable at run time
   = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)

error: environment variable `NIX_INSTALLER_TARBALL_PATH` not defined at compile time
  --> src/settings.rs:20:47
   |
20 | pub const NIX_TARBALL: &[u8] = include_bytes!(env!("NIX_INSTALLER_TARBALL_PATH"));
   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: use `std::env::var("NIX_INSTALLER_TARBALL_PATH")` to read the variable at run time
   = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `nix-installer` (lib) due to 2 previous errors

kastl-ars avatar Jul 16 '24 09:07 kastl-ars