nix: Add nixfmt package to shell.nix, update readme

This commit is contained in:
Yusuf Bera Ertan 2020-06-20 14:11:24 +03:00
parent 6cfa48e82e
commit f6bdc57f1b
No known key found for this signature in database
GPG Key ID: 61807181F60EFCB2
3 changed files with 10 additions and 2 deletions

View File

@ -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`

View File

@ -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.

View File

@ -9,6 +9,7 @@ in pkgs.mkShell {
git
git-lfs
niv
nixfmt
crate2nix
rustup
];