5e9e1146e1
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
49 lines
1 KiB
Nix
49 lines
1 KiB
Nix
{
|
|
lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, udev
|
|
, stdenv
|
|
, Security
|
|
, nix-update-script
|
|
, openssl
|
|
, SystemConfiguration
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-espflash";
|
|
version = "2.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "esp-rs";
|
|
repo = "espflash";
|
|
rev = "v${version}";
|
|
hash = "sha256-PYW5OM3pbmROeGkbGiLhnVGrYq6xn3B1Z4sbIjtAPlk=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
# Needed to get openssl-sys to use pkg-config.
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [
|
|
udev
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
Security
|
|
SystemConfiguration
|
|
];
|
|
|
|
cargoHash = "sha256-gTehRP9Ct150n3Kdz+NudJcKGeOCT059McrXURhy2iQ=";
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
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 ];
|
|
};
|
|
}
|