From ea6d3aa18f516a703128ac4967c4782100993031 Mon Sep 17 00:00:00 2001 From: Raphael Megzari Date: Mon, 17 May 2021 08:06:46 +0900 Subject: [PATCH] cargo-flash: 0.8.0 -> 0.10.1 ; fix darwin build (#123210) --- .../tools/rust/cargo-flash/default.nix | 18 ++++++++++++------ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-flash/default.nix b/pkgs/development/tools/rust/cargo-flash/default.nix index 39b56c2d656..b615ebeaf39 100644 --- a/pkgs/development/tools/rust/cargo-flash/default.nix +++ b/pkgs/development/tools/rust/cargo-flash/default.nix @@ -1,22 +1,28 @@ { lib -, rustPlatform, fetchFromGitHub -, libusb1, pkg-config, rustfmt }: +, stdenv +, rustPlatform +, fetchFromGitHub +, libusb1 +, pkg-config +, rustfmt +, Security +}: rustPlatform.buildRustPackage rec { pname = "cargo-flash"; - version = "0.8.0"; + version = "0.10.1"; src = fetchFromGitHub { owner = "probe-rs"; repo = pname; rev = "v${version}"; - sha256 = "1bcpv1r4pdpp22w7za7kdy7jl487x3nlwxiz6sqq3iq6wq3j9zj0"; + sha256 = "sha256-aQ5647woODs/A4fcxSsQoQHL6YQ0TpfQFegtXETqlHk="; }; - cargoSha256 = "1pf117fgw9x9diksqv58cw7i0kzmp25yj73y5ll69sk46b6z4j90"; + cargoSha256 = "sha256-P7xyg9I1MhmiKlyAI9cvABcYKNxB6TSvTgMsMk5KxAQ="; nativeBuildInputs = [ pkg-config rustfmt ]; - buildInputs = [ libusb1 ]; + buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ Security ]; meta = with lib; { description = "A cargo extension for working with microcontrollers"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a999b951a6..714d8b56c80 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11558,7 +11558,9 @@ in cargo-embed = callPackage ../development/tools/rust/cargo-embed { }; cargo-expand = callPackage ../development/tools/rust/cargo-expand { }; cargo-feature = callPackage ../development/tools/rust/cargo-feature { }; - cargo-flash = callPackage ../development/tools/rust/cargo-flash { }; + cargo-flash = callPackage ../development/tools/rust/cargo-flash { + inherit (darwin.apple_sdk.frameworks) Security; + }; cargo-fund = callPackage ../development/tools/rust/cargo-fund { inherit (darwin.apple_sdk.frameworks) Security; };