2022-10-21 18:38:19 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, pkg-config, udev, stdenv, Security }:
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-espflash";
|
|
|
|
version = "1.7.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esp-rs";
|
|
|
|
repo = "espflash";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-AauIneSnacnY4mulD/qUgfN4K9tLzZXFug0oEsDuj18=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
2022-09-22 12:36:57 +00:00
|
|
|
udev
|
2022-10-21 18:38:19 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Security
|
2022-09-22 12:36:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cargoSha256 = "sha256-82o3B6qmBVPpBVAogClmTbxrBRXY8Lmd2sHmonP5/s8=";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Serial flasher utility for Espressif SoCs and modules based on esptool.py";
|
|
|
|
homepage = "https://github.com/esp-rs/cargo-espflash";
|
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ matthiasbeyer ];
|
|
|
|
};
|
|
|
|
}
|