2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-05-16 23:06:46 +00:00
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libusb1
|
2021-05-17 09:21:16 +00:00
|
|
|
, openssl
|
2021-05-16 23:06:46 +00:00
|
|
|
, pkg-config
|
|
|
|
, rustfmt
|
|
|
|
, Security
|
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";
|
2021-06-24 05:58:52 +00:00
|
|
|
version = "0.11.0";
|
2020-08-24 11:07:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "probe-rs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-06-24 05:58:52 +00:00
|
|
|
sha256 = "sha256-yTtnRdDy3wGBe0SlO0165uooWu6ZMhUQw3hdDUK1e8A=";
|
2020-08-24 11:07:33 +00:00
|
|
|
};
|
|
|
|
|
2021-06-24 05:58:52 +00:00
|
|
|
cargoSha256 = "sha256-f5vUMdyz3vDh2yE0pMKZiknsqTAKkuvTCtlgb6/gaLc=";
|
2020-08-24 11:07:33 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config rustfmt ];
|
2021-08-23 12:11:43 +00:00
|
|
|
buildInputs = [ libusb1 openssl ] ++ lib.optionals stdenv.isDarwin [ Security 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/";
|
2020-08-24 11:07:33 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ fooker ];
|
|
|
|
};
|
|
|
|
}
|