2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchCrate
|
2021-05-20 23:08:51 +00:00
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
2023-02-02 18:25:31 +00:00
|
|
|
, DarwinTools
|
2021-08-25 08:27:29 +00:00
|
|
|
, AppKit
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-flash";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.18.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-RCcl0cZhGOKdwlNY7wuCBP0AgoNSU3c/LfCM2pPjsoo=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
cargoHash = "sha256-NGwWmqP4D5LdXTwo+B+cj+i66Ec9fB723h2kggugLgg=";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ];
|
2021-10-17 02:12:59 +00:00
|
|
|
buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "A cargo extension for working with microcontrollers";
|
2020-11-30 08:33:03 +00:00
|
|
|
homepage = "https://probe.rs/";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/cargo-flash/CHANGELOG.md";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2022-07-18 16:21:45 +00:00
|
|
|
maintainers = with maintainers; [ fooker newam ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|