2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-08-25 08:27:29 +00:00
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libusb1
|
|
|
|
, libftdi1
|
|
|
|
, pkg-config
|
|
|
|
, rustfmt
|
|
|
|
, AppKit
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-embed";
|
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-UlQ7KJmzPWu0vVsYPIkYeqkFFhxe7mEMfUVN7iMaUw0=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
cargoSha256 = "sha256-RkYX5z764Kkr0xK7yYQ0lCw0/7KpmdJmKWqLzwkj4hs=";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config rustfmt ];
|
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/";
|
2021-12-19 01:06:50 +00:00
|
|
|
changelog = "https://github.com/probe-rs/cargo-embed/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
|
|
|
};
|
|
|
|
}
|