mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-07-26 07:58:14 +00:00
docs: remove obsolete mention of cargo2nix tool (#1350)
fix issue #1333 Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1350 Co-authored-by: Gwen Lg <me@gwenlg.fr> Co-committed-by: Gwen Lg <me@gwenlg.fr>
This commit is contained in:
@@ -82,12 +82,6 @@ nix-build \
|
||||
|
||||
*The result is located in `result/bin`. You can pass arguments to cross compile: check `.woodpecker/release.yml` for examples.*
|
||||
|
||||
If you modify a `Cargo.toml` or regenerate any `Cargo.lock`, you must run `cargo2nix`:
|
||||
|
||||
```
|
||||
cargo2nix -f
|
||||
```
|
||||
|
||||
Many tools like rclone, `mc` (minio-client), or `aws` (awscliv2) will be available in your environment and will be useful to test Garage.
|
||||
|
||||
**This is the recommended method.**
|
||||
@@ -124,23 +118,6 @@ cargo fmt # format the project, run it before any commit!
|
||||
cargo clippy # run the linter, run it before any commit!
|
||||
```
|
||||
|
||||
This is specific to our project, but you will need one last tool, `cargo2nix`.
|
||||
To install it, run:
|
||||
|
||||
```bash
|
||||
cargo install --git https://github.com/superboum/cargo2nix --branch main cargo2nix
|
||||
```
|
||||
|
||||
You must use it every time you modify a `Cargo.toml` or regenerate a `Cargo.lock` file as follow:
|
||||
|
||||
```bash
|
||||
cargo build # Rebuild Cargo.lock if needed
|
||||
cargo2nix -f
|
||||
```
|
||||
|
||||
It will output a `Cargo.nix` file which is a specific `Cargo.lock` file dedicated to Nix that is required by our CI
|
||||
which means you must include it in your commits.
|
||||
|
||||
Later, to use our scripts and integration tests, you might need additional tools.
|
||||
These tools are listed at the end of the `shell.nix` package in the `nativeBuildInputs` part.
|
||||
It is up to you to find a way to install the ones you need on your computer.
|
||||
|
||||
@@ -3,15 +3,6 @@ title = "Miscellaneous notes"
|
||||
weight = 20
|
||||
+++
|
||||
|
||||
## Quirks about cargo2nix/rust in Nix
|
||||
|
||||
If you use submodules in your crate (like `crdt` and `replication` in `garage_table`), you must list them in `default.nix`
|
||||
|
||||
The Windows target does not work. it might be solvable through [overrides](https://github.com/cargo2nix/cargo2nix/blob/master/overlay/overrides.nix). Indeed, we pass `x86_64-pc-windows-gnu` but mingw need `x86_64-w64-mingw32`
|
||||
|
||||
We have a simple [PR on cargo2nix](https://github.com/cargo2nix/cargo2nix/pull/201) that fixes critical bugs but the project does not seem very active currently. We must use [my patched version of cargo2nix](https://github.com/superboum/cargo2nix) to enable i686 and armv6l compilation. We might need to contribute to cargo2nix in the future.
|
||||
|
||||
|
||||
## Nix
|
||||
|
||||
Nix has no armv7 + musl toolchains but armv7l is backward compatible with armv6l.
|
||||
|
||||
Reference in New Issue
Block a user