mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 15:13:56 +02:00
ci: use crane
flake to build with nix
This enables to add cargo `fmt`, `clippy` and `deny` to nix, using cached results. Move the `teepot` crate to the `crates` subdir to make the life easier for the `crane` flake. Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
parent
1249048c93
commit
0654bacdb5
41 changed files with 323 additions and 150 deletions
22
flake.nix
22
flake.nix
|
@ -1,6 +1,13 @@
|
|||
{
|
||||
description = "teepot";
|
||||
|
||||
nixConfig.extra-substituters = [
|
||||
"https://nixsgx.cachix.org"
|
||||
];
|
||||
nixConfig.extra-trusted-public-keys = [
|
||||
"nixsgx.cachix.org-1:tGi36DlY2joNsIXOlGnSgWW0+E094V6hW0umQRo/KoE="
|
||||
];
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
|
@ -23,6 +30,11 @@
|
|||
url = "github:oxalica/rust-overlay?rev=3ad32bb27c700b59306224e285b66577e3532dfc";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
crane = {
|
||||
url = "github:ipetkov/crane";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
|
@ -49,6 +61,16 @@
|
|||
|
||||
outputs-builder = channels: {
|
||||
formatter = channels.nixpkgs.nixpkgs-fmt;
|
||||
|
||||
checks = {
|
||||
inherit
|
||||
(channels.nixpkgs.teepot) cargoFmt;
|
||||
inherit
|
||||
(channels.nixpkgs.teepot) cargoClippy;
|
||||
inherit
|
||||
(channels.nixpkgs.teepot) cargoDeny;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue