16 rustPlatform.buildRustPackage rec {
20 src = fetchFromGitHub {
23 rev = "refs/tags/v${version}";
24 hash = "sha256-NplHzdUHlBgujH8rLYT5VbYBV7NljMJEbMAxZ5ZK8JY=";
32 # Needed to get openssl-sys to use pkg-config.
33 OPENSSL_NO_VENDOR = 1;
35 buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isLinux [
37 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
43 cargoHash = "sha256-iA8VJj0btFHUoyY7w8kR+9AU5Yrts4ctr90jxlWQu4c=";
45 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
46 installShellCompletion --cmd espflash \
47 --bash <($out/bin/espflash completions bash) \
48 --zsh <($out/bin/espflash completions zsh) \
49 --fish <($out/bin/espflash completions fish)
52 passthru.updateScript = nix-update-script { };
55 description = "Serial flasher utility for Espressif SoCs and modules based on esptool.py";
56 homepage = "https://github.com/esp-rs/espflash";
57 changelog = "https://github.com/esp-rs/espflash/blob/v${version}/CHANGELOG.md";
58 mainProgram = "espflash";
59 license = with licenses; [ mit /* or */ asl20 ];
60 maintainers = with maintainers; [ matthiasbeyer ];