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