From 19c40caf2c4743d48c28fb413af6422cfb4de4a9 Mon Sep 17 00:00:00 2001 From: Yt Date: Mon, 10 Jul 2023 07:06:52 +0800 Subject: [PATCH] cargo-espflash: 1.7.0 -> 2.0.0 (#242381) --- .../tools/rust/cargo-espflash/default.nix | 27 +++++++++++++++---- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-espflash/default.nix b/pkgs/development/tools/rust/cargo-espflash/default.nix index 26f935c58725..1439e9598783 100644 --- a/pkgs/development/tools/rust/cargo-espflash/default.nix +++ b/pkgs/development/tools/rust/cargo-espflash/default.nix @@ -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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 41a5a35d93ae..c94b2b8aa504 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {