style: nixfmt-rfc-style
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
parent
7db9d3a2e1
commit
747e481bcb
2 changed files with 12 additions and 46 deletions
|
@ -5,7 +5,7 @@
|
|||
{
|
||||
projectRootFile = "Cargo.toml";
|
||||
programs = {
|
||||
nixpkgs-fmt.enable = true; # nix
|
||||
nixfmt-rfc-style.enable = true; # nix
|
||||
statix.enable = true; # nix static analysis
|
||||
deadnix.enable = true; # find dead nix code
|
||||
rustfmt.enable = true; # rust
|
||||
|
|
56
flake.nix
56
flake.nix
|
@ -85,9 +85,7 @@
|
|||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
|
||||
pkgs = (import nixpkgs) {
|
||||
inherit system overlays;
|
||||
};
|
||||
pkgs = (import nixpkgs) { inherit system overlays; };
|
||||
|
||||
inherit (pkgs) lib;
|
||||
|
||||
|
@ -101,9 +99,7 @@
|
|||
inherit src;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.pkg-config
|
||||
];
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
|
@ -205,27 +201,16 @@
|
|||
}
|
||||
);
|
||||
|
||||
cargo-workspace-doc = craneLib.cargoDoc (
|
||||
commonArgs
|
||||
// {
|
||||
inherit cargoArtifacts;
|
||||
}
|
||||
);
|
||||
cargo-workspace-doc = craneLib.cargoDoc (commonArgs // { inherit cargoArtifacts; });
|
||||
|
||||
# Check formatting
|
||||
cargo-workspace-fmt = craneLib.cargoFmt {
|
||||
inherit src;
|
||||
};
|
||||
cargo-workspace-fmt = craneLib.cargoFmt { inherit src; };
|
||||
|
||||
# Audit dependencies
|
||||
cargo-workspace-audit = craneLib.cargoAudit {
|
||||
inherit src advisory-db;
|
||||
};
|
||||
cargo-workspace-audit = craneLib.cargoAudit { inherit src advisory-db; };
|
||||
|
||||
# Audit licenses
|
||||
cargo-workspace-deny = craneLib.cargoDeny {
|
||||
inherit src;
|
||||
};
|
||||
cargo-workspace-deny = craneLib.cargoDeny { inherit src; };
|
||||
|
||||
# Run tests with cargo-nextest
|
||||
# Consider setting `doCheck = false` on other crate derivations
|
||||
|
@ -252,9 +237,7 @@
|
|||
cargo hakari verify
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.cargo-hakari
|
||||
];
|
||||
nativeBuildInputs = [ pkgs.cargo-hakari ];
|
||||
};
|
||||
pre-commit-check =
|
||||
let
|
||||
|
@ -268,7 +251,8 @@
|
|||
pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = treefmtFormatters // {
|
||||
convco.enable = true; # not in treefmt
|
||||
# not in treefmt
|
||||
convco.enable = true;
|
||||
reuse = {
|
||||
enable = true;
|
||||
name = "reuse";
|
||||
|
@ -287,17 +271,12 @@
|
|||
}
|
||||
// lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
|
||||
cargo-workspace-llvm-coverage = craneLibLLvmTools.cargoLlvmCov (
|
||||
commonArgs
|
||||
// {
|
||||
inherit cargoArtifacts;
|
||||
}
|
||||
commonArgs // { inherit cargoArtifacts; }
|
||||
);
|
||||
};
|
||||
|
||||
apps = {
|
||||
nix-weather = flake-utils.lib.mkApp {
|
||||
drv = nix-weather;
|
||||
};
|
||||
nix-weather = flake-utils.lib.mkApp { drv = nix-weather; };
|
||||
};
|
||||
|
||||
# For `nix develop`:
|
||||
|
@ -332,16 +311,3 @@
|
|||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue