Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
61 lines
1.4 KiB
Nix
61 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
installShellFiles,
|
|
stdenv,
|
|
nix-update-script,
|
|
openssl,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "espflash";
|
|
version = "4.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "esp-rs";
|
|
repo = "espflash";
|
|
tag = "v${version}";
|
|
hash = "sha256-9ijQngCFm2ssX258nomgy84KEjib2nHVlQ2HG3prjqQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
installShellFiles
|
|
];
|
|
|
|
# Needed to get openssl-sys to use pkg-config.
|
|
env.OPENSSL_NO_VENDOR = 1;
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
cargoHash = "sha256-vNGO2eWHwHcjhAZ9hrIkX3T4XYxYEvlb3R+JEVbXMZg=";
|
|
|
|
cargoBuildFlags = [
|
|
"--exclude xtask"
|
|
"--workspace"
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd espflash \
|
|
--bash <($out/bin/espflash completions bash) \
|
|
--zsh <($out/bin/espflash completions zsh) \
|
|
--fish <($out/bin/espflash completions fish)
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Serial flasher utility for Espressif SoCs and modules based on esptool.py";
|
|
homepage = "https://github.com/esp-rs/espflash";
|
|
changelog = "https://github.com/esp-rs/espflash/blob/v${version}/CHANGELOG.md";
|
|
mainProgram = "espflash";
|
|
license = with lib.licenses; [
|
|
mit # or
|
|
asl20
|
|
];
|
|
maintainers = with lib.maintainers; [ matthiasbeyer ];
|
|
};
|
|
}
|