2023-02-16 19:38:24 +05:30
|
|
|
{
|
|
|
|
description = "gitice";
|
|
|
|
|
2024-05-11 11:56:45 +05:30
|
|
|
inputs.nixpkgs.url = "github:msfjarvis/nixpkgs/nixpkgs-unstable";
|
2023-02-16 19:38:24 +05:30
|
|
|
|
2023-06-26 00:43:35 +05:30
|
|
|
inputs.systems.url = "github:msfjarvis/flake-systems";
|
2023-05-15 11:41:25 +05:30
|
|
|
|
2023-06-26 00:43:35 +05:30
|
|
|
inputs.advisory-db.url = "github:rustsec/advisory-db";
|
|
|
|
inputs.advisory-db.flake = false;
|
2023-02-16 19:38:24 +05:30
|
|
|
|
2023-06-26 00:43:35 +05:30
|
|
|
inputs.crane.url = "github:ipetkov/crane";
|
|
|
|
inputs.crane.inputs.nixpkgs.follows = "nixpkgs";
|
2023-02-16 19:38:24 +05:30
|
|
|
|
2023-06-26 00:44:48 +05:30
|
|
|
inputs.devshell.url = "github:numtide/devshell";
|
|
|
|
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-31 11:26:49 +05:30
|
|
|
inputs.devshell.inputs.flake-utils.follows = "flake-utils";
|
2023-06-26 00:44:48 +05:30
|
|
|
|
2023-06-26 00:43:35 +05:30
|
|
|
inputs.fenix.url = "github:nix-community/fenix";
|
|
|
|
inputs.fenix.inputs.nixpkgs.follows = "nixpkgs";
|
2023-02-16 19:38:24 +05:30
|
|
|
|
2023-06-26 00:43:35 +05:30
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
inputs.flake-utils.inputs.systems.follows = "systems";
|
|
|
|
|
|
|
|
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
|
|
|
inputs.flake-compat.flake = false;
|
2023-02-16 19:38:24 +05:30
|
|
|
|
|
|
|
outputs = {
|
|
|
|
nixpkgs,
|
2023-06-26 00:43:35 +05:30
|
|
|
advisory-db,
|
2023-02-16 19:38:24 +05:30
|
|
|
crane,
|
2023-06-26 00:44:48 +05:30
|
|
|
devshell,
|
2023-06-26 00:43:35 +05:30
|
|
|
fenix,
|
2023-02-16 19:38:24 +05:30
|
|
|
flake-utils,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
2023-06-26 00:44:48 +05:30
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
2023-11-03 02:09:33 +05:30
|
|
|
overlays = [devshell.overlays.default];
|
2023-06-26 00:44:48 +05:30
|
|
|
};
|
2023-05-15 11:41:25 +05:30
|
|
|
|
2023-06-16 01:55:13 +05:30
|
|
|
rustNightly = (import fenix {inherit pkgs;}).fromToolchainFile {
|
2023-05-15 11:41:25 +05:30
|
|
|
file = ./rust-toolchain.toml;
|
2024-03-14 17:53:22 +05:30
|
|
|
sha256 = "sha256-Je+rS6Tgc04HqvDj2XvjOpbyIAcEee0JqqrG7+cUydI=";
|
2023-02-16 19:38:24 +05:30
|
|
|
};
|
|
|
|
|
2023-06-16 01:55:13 +05:30
|
|
|
craneLib = (crane.mkLib pkgs).overrideToolchain rustNightly;
|
2023-05-11 13:22:24 +05:30
|
|
|
src = craneLib.cleanCargoSource ./.;
|
2023-05-11 13:31:40 +05:30
|
|
|
nativeBuildInputs = [];
|
|
|
|
buildInputs = [];
|
2023-05-11 13:22:24 +05:30
|
|
|
cargoArtifacts = craneLib.buildDepsOnly {
|
2023-02-16 19:38:24 +05:30
|
|
|
inherit src buildInputs nativeBuildInputs;
|
|
|
|
};
|
2023-05-11 13:22:24 +05:30
|
|
|
|
|
|
|
commonArgs = {
|
|
|
|
inherit src cargoArtifacts buildInputs nativeBuildInputs;
|
2023-02-16 19:38:24 +05:30
|
|
|
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
|
|
|
};
|
2023-05-11 13:22:24 +05:30
|
|
|
|
|
|
|
gitice = craneLib.buildPackage (commonArgs // {doCheck = false;});
|
|
|
|
gitice-clippy = craneLib.cargoClippy (commonArgs // {});
|
|
|
|
gitice-fmt = craneLib.cargoFmt (commonArgs // {});
|
2023-02-16 19:38:24 +05:30
|
|
|
gitice-audit =
|
2023-05-11 13:22:24 +05:30
|
|
|
craneLib.cargoAudit (commonArgs // {inherit advisory-db;});
|
|
|
|
gitice-nextest = craneLib.cargoNextest (commonArgs
|
|
|
|
// {
|
|
|
|
partitions = 1;
|
|
|
|
partitionType = "count";
|
|
|
|
});
|
2023-02-16 19:38:24 +05:30
|
|
|
in {
|
|
|
|
checks = {
|
2024-03-14 18:15:30 +05:30
|
|
|
inherit gitice gitice-audit gitice-clippy gitice-fmt gitice-nextest;
|
2023-02-16 19:38:24 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
packages.default = gitice;
|
|
|
|
|
|
|
|
apps.default = flake-utils.lib.mkApp {drv = gitice;};
|
|
|
|
|
2023-06-26 00:44:48 +05:30
|
|
|
devShells.default = pkgs.devshell.mkShell {
|
|
|
|
bash = {interactive = "";};
|
|
|
|
|
|
|
|
env = [
|
|
|
|
{
|
|
|
|
name = "DEVSHELL_NO_MOTD";
|
|
|
|
value = 1;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
2023-11-03 02:08:46 +05:30
|
|
|
cargo-dist
|
2023-06-26 00:44:48 +05:30
|
|
|
cargo-nextest
|
|
|
|
cargo-release
|
2023-10-24 17:30:59 +05:30
|
|
|
git-cliff
|
2023-06-26 00:44:48 +05:30
|
|
|
rustNightly
|
2023-12-29 11:28:19 +05:30
|
|
|
stdenv.cc
|
2023-06-26 00:44:48 +05:30
|
|
|
];
|
2023-02-16 19:38:24 +05:30
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|