veloren/nix
2020-11-28 17:45:58 +03:00
..
.envrc nix: regenerate Cargo.nix, update dependencies, some tweaks for better reproducibility, remove rustup from shell.nix (causes issues) and add rustc, cargo instead 2020-07-16 13:40:39 +00:00
Cargo.nix fix and improve nix build: actually output a proper veloren voxygen package now 2020-11-25 02:00:50 +03:00
common.nix nix: fix build failing when on tag, combine nixpkgs.nix and common.nix 2020-11-28 17:45:58 +03:00
crate-hashes.json fix and improve nix build: actually output a proper veloren voxygen package now 2020-11-25 02:00:50 +03:00
default.nix nix: fix build failing when on tag, combine nixpkgs.nix and common.nix 2020-11-28 17:45:58 +03:00
README.md fix and improve nix build: actually output a proper veloren voxygen package now 2020-11-25 02:00:50 +03:00
shell.nix nix: fix build failing when on tag, combine nixpkgs.nix and common.nix 2020-11-28 17:45:58 +03:00
sources.json fix and improve nix build: actually output a proper veloren voxygen package now 2020-11-25 02:00:50 +03:00
sources.nix fix and improve nix build: actually output a proper veloren voxygen package now 2020-11-25 02:00:50 +03:00

How to use

To build and install Voxygen and the server CLI into user profile, run:

nix-env -f nix/default.nix -i

You can configure what to install by changing the cratesToBuild argument:

nix-env -f nix/default.nix --arg cratesToBuild '["veloren-voxygen"]'

For example, this will install Voxygen only.

To enter the development shell (which includes all tools mentioned in this readme + tools you'll need to develop Veloren), run:

nix-shell nix/shell.nix

Managing Cargo.nix

Enter the development shell.

To update Cargo.nix (and crate-hashes.json) using latest Cargo.lock, run:

crate2nix generate -f ../Cargo.toml

Managing dependencies

We use niv to manage dependencies.

To update the dependencies, run (from repository root):

niv update

Formatting

Use nixfmt to format files.

To format every Nix file in current working directory:

nixfmt *.nix