mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
nix: Add nixfmt package to shell.nix, update readme
This commit is contained in:
parent
6cfa48e82e
commit
f6bdc57f1b
@ -6,7 +6,7 @@ To build Voxygen, run:
|
||||
To build another binary, run:
|
||||
`nix build --arg crateName "<binary name here>"`
|
||||
|
||||
To enter the development shell, run:
|
||||
To enter the development shell (which includes all tools mentioned in this readme), run:
|
||||
`nix-shell shell.nix`
|
||||
|
||||
### Managing Cargo.nix
|
||||
@ -25,3 +25,10 @@ Enter the development shell in repository root:
|
||||
|
||||
To update the dependencies, run:
|
||||
`niv update`
|
||||
|
||||
### Formatting
|
||||
|
||||
Use [nixfmt](https://github.com/serokell/nixfmt) to format files.
|
||||
|
||||
To format every file:
|
||||
`nixfmt *.nix`
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ crateName ? "veloren-voxygen",
|
||||
# `crate2nix` doesn't support profiles in `Cargo.toml`, so default to release. Otherwise bad performance (non-release is built with opt level 0)
|
||||
release ? true, sources, nixpkgsSrc }:
|
||||
release ? true, sources ? import ./sources.nix { }, nixpkgsSrc ? <nixpkgs> }:
|
||||
|
||||
let
|
||||
# Check if git-lfs is working.
|
||||
|
@ -9,6 +9,7 @@ in pkgs.mkShell {
|
||||
git
|
||||
git-lfs
|
||||
niv
|
||||
nixfmt
|
||||
crate2nix
|
||||
rustup
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user