foxmark3 0.1.1

Send/receive Proxmark 3 commands
Documentation
{
  description = "An easy and robust event check-in system built atop a Proxmark 3 and set of pre-existing ISO/IEC 14443-3 compliant RFID cards";
  inputs = {
    flake-parts.url = "github:hercules-ci/flake-parts";
    nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";

    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    pre-commit-hooks = {
      url = "github:cachix/git-hooks.nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs =
    inputs@{
      flake-parts,
      pre-commit-hooks,
      ...
    }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      systems = [ "x86_64-linux" ];
      perSystem =
        { pkgs, system, ... }:
        let
          rust = pkgs.rust-bin.stable.latest;
          check = pre-commit-hooks.lib.${system}.run {
            src = ./.;
            hooks = {
              deadnix = {
                enable = true;
                args = [ "--no-lambda-pattern-names" ];
              };
              nixfmt-rfc-style.enable = true;
              statix.enable = true;

              cargo-check.enable = true;
              rustfmt.enable = true;
            };
          };

          buildDeps = [
            pkgs.pkg-config
          ];
          runtimeDeps = [
            pkgs.systemd
          ];
          devDeps = [
            pkgs.bacon
            pkgs.proxmark3
          ];

          alipad = builtins.fromTOML (builtins.readFile ./Cargo.toml);
        in
        {
          _module.args.pkgs = import inputs.nixpkgs {
            inherit system;
            overlays = [ (import inputs.rust-overlay) ];
          };

          checks.pre-commit-check = check;

          packages.default =
            (pkgs.makeRustPlatform {
              cargo = rust.minimal;
              rustc = rust.minimal;
            }).buildRustPackage
              {
                inherit (alipad.package) name version;
                src = ./.;
                cargoLock.lockFile = ./Cargo.lock;
                buildInputs = runtimeDeps;
                nativeBuildInputs = buildDeps;
              };

          devShells.default =
            pkgs.mkShell.override
              {
                stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.clangStdenv;
              }
              {
                shellHook = check.shellHook + ''
                  export RUST_SRC_PATH=${pkgs.rustPlatform.rustLibSrc}
                '';
                buildInputs = runtimeDeps ++ check.enabledPackages;
                nativeBuildInputs = buildDeps ++ devDeps ++ [ rust.default ];
              };
        };
    };
}