2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
|
|
|
, rustfmt
|
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";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "0.13.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "probe-rs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
sha256 = "sha256-O6T1Wul0nJaTVp9MEOj9FT+FUt4oYfqR5pGFaAxuK30=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
cargoSha256 = "sha256-E2gBkr50hjkzY+ZVgMm7tpdwr9yuyFh65Ht6FAPvxYg=";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config rustfmt ];
|
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/";
|
2021-12-06 16:07:01 +00:00
|
|
|
changelog = "https://github.com/probe-rs/cargo-flash/blob/v${version}/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
|
|
|
};
|
|
|
|
}
|