2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-08-25 08:27:29 +00:00
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchCrate
|
2021-08-25 08:27:29 +00:00
|
|
|
, libusb1
|
|
|
|
, libftdi1
|
|
|
|
, pkg-config
|
2023-02-02 18:25:31 +00:00
|
|
|
, DarwinTools
|
2021-08-25 08:27:29 +00:00
|
|
|
, AppKit
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-embed";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.16.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-YAeE3pDw5xqSn4rAv3lxJtKQHki1bf97CJHBEK8JoiA=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
cargoSha256 = "sha256-p6d8vdiAVkufTQv3FliKCBgF5ZXM24UnG96EzlpyfZE=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
buildInputs = [ libusb1 libftdi1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildFeatures = [ "ftdi" ];
|
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-embed/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
|
|
|
};
|
|
|
|
}
|