rempl 0.1.0

A simple library for creating html components directly in your source
Documentation
{
  description = "Flake for rempl";

  inputs = {
    flake-parts.url = "github:hercules-ci/flake-parts";
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    devshell.url = "github:numtide/devshell";
    devshell-helpers.url = "sourcehut:~yuiyukihira/devshell";
    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    crane = {
      url = "github:ipetkov/crane";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    advisory-db = {
      url = "github:rustsec/advisory-db";
      flake = false;
    };
  };

  outputs = inputs@{ flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      imports = [ inputs.devshell.flakeModule ];
      systems =
        [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-dawin" ];
      perSystem = { config, self', inputs', pkgs, system, ... }:
        let
          craneLib = (inputs.crane.mkLib pkgs).overrideToolchain
            (p: p.rust-bin.stable.latest.default);
          src = craneLib.cleanCargoSource ./.;

          commonArgs = {
            inherit src;
            strictDeps = true;

            buildInputs = [ ]
              ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ pkgs.libiconv ];
          };

          cargoArtifacts = craneLib.buildDepsOnly commonArgs;

          rempl =
            craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; });
        in {
          _module.args.pkgs = import inputs.nixpkgs {
            inherit system;
            overlays = [ inputs.rust-overlay.overlays.default ];
          };

          checks = {
            inherit rempl;
            rempl-clippy = craneLib.cargoClippy (commonArgs // {
              inherit cargoArtifacts;
              cargoClippyExtraArgs = "--all-targets -- --deny warnings";
            });
            rempl-docs =
              craneLib.cargoDoc (commonArgs // { inherit cargoArtifacts; });

            rempl-fmt = craneLib.cargoFmt { inherit src; };

            rempl-audit = craneLib.cargoAudit {
              inherit src;
              inherit (inputs) advisory-db;
            };

            rempl-deny = craneLib.cargoDeny { inherit src; };

            rempl-nextest = craneLib.cargoNextest (commonArgs // {
              inherit cargoArtifacts;
              partitions = 1;
              partitionType = "count";
            });
          };

          devshells.default = {
            imports =
              [ inputs.devshell-helpers.devshellProfiles.language.rust ];

            language.rust.packageSet = pkgs.rust-bin.stable.latest.default;

            packages = with pkgs; [ git-cliff cargo-release ];
          };
        };
    };
}