This is a new convention that lets consumers of the flake control what
systems this flake will be built with.
As a consumer you can pass your own list of systems, by overriding the
inputs. Eg:
```
inputs.systems.url = "path:./flake.systems.nix";
inputs.systems.flake = false;
inputs.treefmt.url = "github:numtide/treefmt";
inputs.treefmt.inputs.follows.systems = "systems";
```
Invented with the help of bb010g in https://github.com/numtide/flake-utils/pull/84
See <https://github.com/nix-systems/nix-systems>
https://github.com/numtide/treefmt-nix now contains both the treefmt Nix
module configuration, and also a collection of pre-configured
formatters.
By moving that functionality over there, we can make use of the same
mechanisms on the treefmt package that is shipped with nixpkgs. Another
possibility might have been to add withConfig to nixpkgs, but from
experience nix code that is duplicated in nixpkgs starts evolving on its
own.
This is useful if you want to configure treefmt with nix, and precisely
pass all the commands from nixpkgs.
Co-authored-by: Sridhar Ratnakumar <srid@srid.ca>
- Naersk has the annoying property to pin nixpkgs as a dep
- Nixpkgs mostly is a _core_ dependency that it is worth auditing duely
(e.g. to avoid cache mismatches and other spourious errors)
- Every usage of naersk adds a another "spurious" nixpkgs dep somewhere
to the flake lock. That makes auditing less straight forward.
We shouldn't punish stable Nix users. flake-compat does that by making
the default.nix convoluted to use. Instead do the reverse and have
flake.nix depend on default.nix.
* nix: simplify the code a bit
* docs: fix the website
Make the paths relative so they work on GitHub Pages. Fix the landing
page overriding the docs. Put the docs in the right sub-folder.
Introduce naersk so we don't have to update the cargoSha256 all the
time.
Use nixpkgs rust instead of rust-overlay to make the integration with
naersk easier.
Remove the overlay as it wasn't very useful. Since we depend on
third-party dependencies, the overlay cannot be used in standalone
anyways.
Update flake.lock
* remove curl
It is not being used right now and depends on libcurl and zlib
* devshell: add clang
Rust need a CC to compile some of the stuff. Since LLVM is being used by
Rust and clang is also working on darwin, use that.
* Use oxalica's rust-overlay, add project binary using rustPlatform, and update flake.nix
Co-authored-by: Andika Demas Riyandi <andika.riyan@gmail.com>