2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-05-16 23:06:46 +00:00
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
2023-01-28 18:29:55 +00:00
|
|
|
, fetchCrate
|
2021-05-16 23:06:46 +00:00
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
2023-01-28 18:29:55 +00:00
|
|
|
, DarwinTools
|
2021-08-23 12:11:43 +00:00
|
|
|
, AppKit
|
2021-05-16 23:06:46 +00:00
|
|
|
}:
|
2020-08-24 11:07:33 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-flash";
|
2023-01-29 22:19:01 +00:00
|
|
|
version = "0.16.0";
|
2020-08-24 11:07:33 +00:00
|
|
|
|
2023-01-28 18:29:55 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-01-29 22:19:01 +00:00
|
|
|
sha256 = "sha256-Zwb9jUZwkvuBzvACMwKwpAHEMkjLVDkXfDLo4ntG3+k=";
|
2020-08-24 11:07:33 +00:00
|
|
|
};
|
|
|
|
|
2023-01-29 22:19:01 +00:00
|
|
|
cargoSha256 = "sha256-giGSTMtGTIw4ZZglHqbW2sGKO/D/3TVQR5olTgitBjE=";
|
2020-08-24 11:07:33 +00:00
|
|
|
|
2023-01-28 18:29:55 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ];
|
2021-10-13 00:39:48 +00:00
|
|
|
buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
2020-08-24 11:07:33 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "A cargo extension for working with microcontrollers";
|
2020-10-23 13:05:17 +00:00
|
|
|
homepage = "https://probe.rs/";
|
2023-01-28 18:29:55 +00:00
|
|
|
changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/cargo-flash/CHANGELOG.md";
|
2020-08-24 11:07:33 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2022-07-15 04:49:37 +00:00
|
|
|
maintainers = with maintainers; [ fooker newam ];
|
2020-08-24 11:07:33 +00:00
|
|
|
};
|
|
|
|
}
|