16 rustPlatform.buildRustPackage rec {
20 src = fetchFromGitHub {
23 rev = "refs/tags/v${version}";
24 hash = "sha256-X9VTwXk/6zAkQb5P9Wz8Pt4oIt2xXfff9dhGb8wauG4=";
32 # Needed to get openssl-sys to use pkg-config.
33 OPENSSL_NO_VENDOR = 1;
37 ++ lib.optionals stdenv.hostPlatform.isLinux [
40 ++ lib.optionals stdenv.hostPlatform.isDarwin [
46 cargoHash = "sha256-3xUDsznzIRlfGwVuIH1+Ub5tE/ST981KZS/2TAKaBAE=";
48 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
49 installShellCompletion --cmd espflash \
50 --bash <($out/bin/espflash completions bash) \
51 --zsh <($out/bin/espflash completions zsh) \
52 --fish <($out/bin/espflash completions fish)
55 passthru.updateScript = nix-update-script { };
58 description = "Serial flasher utility for Espressif SoCs and modules based on esptool.py";
59 homepage = "https://github.com/esp-rs/espflash";
60 changelog = "https://github.com/esp-rs/espflash/blob/v${version}/CHANGELOG.md";
61 mainProgram = "espflash";
62 license = with licenses; [
66 maintainers = with maintainers; [ matthiasbeyer ];