Most of the ecosystem has moved to this formatter, and many people configured their editors to autoformat it with this formatter. Closes: https://git.snix.dev/snix/snix/issues/62 Change-Id: Icf39e7836c91fc2ae49fbe22a40a639105bfb0bd Reviewed-on: https://cl.snix.dev/c/snix/+/30671 Reviewed-by: Florian Klink <flokli@flokli.de> Tested-by: besadii Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com> |
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.nix | ||
| Cargo.toml | ||
| default.nix | ||
| README.md | ||
fetchroots
This tool is part of a suite of tools built to manage cache.nixos.org.
This tool's purpose is to build an index of all the GC roots from the channels.nixos.org releases. The result is then combined with other tools.
It does this by:
- Listing all the release files in the bucket.
- Getting the data for each of the release.
- Putting them in a local parquet file.
Getting started
In order to run this, you'll need AWS SSO credentials from the NixOS Infra team.
Get the creds from https://nixos.awsapps.com/start/ -> LBNixOS_Dev_PDX -> AWSReadOnlyAccess.
Run mg run, you should see a progress bar.
Congrats, you now have a roots.parquet file. You can now load it with python polars-rs or clickhouse.
roots.parquet file format
key(String): the release, egnixos/22.11-small/nixos-22.11.513.563dc6476b8timestamp(DateTime): the timestamp of the GC roots file for this releasestore_path_hash(List[Binary]): hash part of the store paths rooted by this release
Development
When the Cargo.lock changes, run mg run //tools:crate2nix-generate.
To build the project, run mg build.
To get a dev environment, run nix-shell -p cargo.