2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-08-23 13:56:10 +01:00
|
|
|
, stdenv
|
2021-08-23 13:39:23 +01:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libusb1
|
|
|
|
, libftdi1
|
|
|
|
, pkg-config
|
|
|
|
, rustfmt
|
2021-08-23 13:56:10 +01:00
|
|
|
, AppKit
|
2021-08-23 13:39:23 +01:00
|
|
|
}:
|
2020-08-24 12:07:21 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-embed";
|
2021-11-25 15:28:16 +00:00
|
|
|
version = "0.12.0";
|
2020-08-24 12:07:21 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "probe-rs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-11-25 15:28:16 +00:00
|
|
|
sha256 = "1is58n8y5lvnvzkbnh3gfk3r3f2r1w4l2qjdp2k8373apxzjxdvr";
|
2020-08-24 12:07:21 +01:00
|
|
|
};
|
|
|
|
|
2021-11-25 15:28:16 +00:00
|
|
|
cargoSha256 = "0kalwigck9lf734zdpzg01sf2zzyrgdgq2rg3qj7hy94gfxlsk63";
|
2020-08-24 12:07:21 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config rustfmt ];
|
2021-08-23 13:56:10 +01:00
|
|
|
buildInputs = [ libusb1 libftdi1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
2021-05-11 01:43:37 +01:00
|
|
|
|
2021-11-16 00:39:41 +00:00
|
|
|
buildFeatures = [ "ftdi" ];
|
2020-08-24 12:07:21 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "A cargo extension for working with microcontrollers";
|
2020-10-23 14:05:17 +01:00
|
|
|
homepage = "https://probe.rs/";
|
2021-11-25 15:28:16 +00:00
|
|
|
changelog = "https://github.com/probe-rs/cargo-embed/blob/v${version}/CHANGELOG.md";
|
2020-08-24 12:07:21 +01:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ fooker ];
|
|
|
|
};
|
|
|
|
}
|