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