nixpkgs-suyu/pkgs/development/tools/rust/cargo-embed/default.nix

30 lines
775 B
Nix
Raw Normal View History

{ lib
2020-08-24 13:07:21 +02:00
, rustPlatform, fetchFromGitHub
2021-05-11 02:43:37 +02:00
, libusb1, libftdi1, pkg-config, rustfmt }:
2020-08-24 13:07:21 +02:00
rustPlatform.buildRustPackage rec {
pname = "cargo-embed";
2021-05-11 02:43:37 +02:00
version = "0.10.1";
2020-08-24 13:07:21 +02:00
src = fetchFromGitHub {
owner = "probe-rs";
repo = pname;
rev = "v${version}";
2021-05-11 02:43:37 +02:00
sha256 = "1z8n883cb4jca3phi9x2kwl01xclyr00l8jxgiyd28l2jik78i5k";
2020-08-24 13:07:21 +02:00
};
2021-05-11 02:43:37 +02:00
cargoSha256 = "1ir9qngxmja6cm42m40jqbga9mlfjllm23ca26wyigjv3025pi6i";
2020-08-24 13:07:21 +02:00
nativeBuildInputs = [ pkg-config rustfmt ];
2021-05-11 02:43:37 +02:00
buildInputs = [ libusb1 libftdi1 ];
cargoBuildFlags = [ "--features=ftdi" ];
2020-08-24 13:07:21 +02:00
meta = with lib; {
description = "A cargo extension for working with microcontrollers";
homepage = "https://probe.rs/";
2020-08-24 13:07:21 +02:00
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ fooker ];
};
}