{ description = "A prompt-like file editor for commit messages."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; crane.url = "github:ipetkov/crane"; }; outputs = { self, nixpkgs, flake-utils, crane, ... }: flake-utils.lib.eachDefaultSystem ( system: let pkgs = nixpkgs.legacyPackages.${system}; craneLib = crane.mkLib pkgs; src = craneLib.cleanCargoSource ./.; commonArgs = { inherit src; strictDeps = true; }; cargoArtifacts = craneLib.buildDepsOnly commonArgs; cme = craneLib.buildPackage ( commonArgs // { inherit cargoArtifacts; doCheck = false; } ); in { checks = { inherit cme; cme-clippy = craneLib.cargoClippy ( commonArgs // { inherit cargoArtifacts; cargoClippyExtraArgs = "--all-targets -- --deny warnings"; } ); cme-doc = craneLib.cargoDoc ( commonArgs // { inherit cargoArtifacts; env.RUSTDOCFLAGS = "--deny warnings"; } ); cme-fmt = craneLib.cargoFmt { inherit src; }; cme-nextest = craneLib.cargoNextest ( commonArgs // { inherit cargoArtifacts; partitions = 1; partitionType = "count"; cargoNextestPartitionsExtraArgs = "--no-tests=pass"; } ); }; packages = { default = cme; }; apps.default = flake-utils.lib.mkApp { drv = cme; }; devShells.default = craneLib.devShell { checks = self.checks.${system}; }; } ); }