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-04-15 01:41:22 +00:00
|
|
|
version = "0.12.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "probe-rs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-bd0TY8bdpLHLCdDQgJeJvqjAcSF67+LGSNx8yafYbys=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
cargoSha256 = "sha256-bx2N8zP7BmqU6oM/7Nf2i9S1uNWItReQMD59vtG1RKE=";
|
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 ];
|
|
|
|
maintainers = with maintainers; [ fooker ];
|
|
|
|
};
|
|
|
|
}
|