Skip to content

Commit

Permalink
cargo-espflash: 1.7.0 -> 2.0.0 (NixOS#242381)
Browse files Browse the repository at this point in the history
  • Loading branch information
happysalada authored Jul 9, 2023
1 parent c40953b commit 19c40ca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
27 changes: 22 additions & 5 deletions pkgs/development/tools/rust/cargo-espflash/default.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
{ lib, rustPlatform, fetchFromGitHub, pkg-config, udev, stdenv, Security }:
{
lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, udev
, stdenv
, Security
, nix-update-script
, openssl
, SystemConfiguration
}:

rustPlatform.buildRustPackage rec {
pname = "cargo-espflash";
version = "1.7.0";
version = "2.0.0";

src = fetchFromGitHub {
owner = "esp-rs";
repo = "espflash";
rev = "v${version}";
sha256 = "sha256-AauIneSnacnY4mulD/qUgfN4K9tLzZXFug0oEsDuj18=";
hash = "sha256-3E0OC8DVP2muLyoN4DQfrdnK+idQEm7IpaA/CUIyYnU=";
};

nativeBuildInputs = [
pkg-config
];

buildInputs = lib.optionals stdenv.isLinux [
# 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
];

cargoSha256 = "sha256-82o3B6qmBVPpBVAogClmTbxrBRXY8Lmd2sHmonP5/s8=";
cargoHash = "sha256-8VIAmmtaQoIvD7wN+W3yUM0CEDadOQrv1wnJ4/AWKFA=";

passthru.updateScript = nix-update-script { };

meta = with lib; {
description = "Serial flasher utility for Espressif SoCs and modules based on esptool.py";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16666,7 +16666,7 @@ with pkgs;
cargo2junit = callPackage ../development/tools/rust/cargo2junit { };

cargo-espflash = callPackage ../development/tools/rust/cargo-espflash {
inherit (darwin.apple_sdk.frameworks) Security;
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
};

cargo-web = callPackage ../development/tools/rust/cargo-web {
Expand Down

0 comments on commit 19c40ca

Please sign in to comment.