carlossless / sinowealth-kb-tool

A utility for reading and writing flash contents on Sinowealth 8051-based HID devices through the commonly found ISP bootloader
MIT License
54 stars 15 forks source link

distribution through nix flake #11

Closed carlossless closed 10 months ago

carlossless commented 10 months ago

Changes here enable easy distribution of this tool as a nix flake.

Usage example:

{
  inputs = {
    flake-utils.url = "github:numtide/flake-utils";
    sinowealth-kb-tool.url = "github:carlossless/sinowealth-kb-tool";
  };

  outputs = { self, nixpkgs, flake-utils, sinowealth-kb-tool }:
    flake-utils.lib.eachDefaultSystem (
      system: let pkgs = nixpkgs.legacyPackages.${system}; in
        {
          devShells.default = pkgs.mkShell {
            buildInputs = with pkgs; [
              sinowealth-kb-tool.packages."${system}".default
            ];
          };
        }
    );
}