3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rust/cargo-embed/default.nix

37 lines
841 B
Nix
Raw Normal View History

{ 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-06-24 00:18:43 +01:00
version = "0.11.0";
2020-08-24 12:07:21 +01:00
src = fetchFromGitHub {
owner = "probe-rs";
repo = pname;
rev = "v${version}";
2021-06-24 00:18:43 +01:00
sha256 = "151zdnv4i0dgkk4w3j2a1sdklcxw07bgqjs7sv6lvkylrx8dfrxa";
2020-08-24 12:07:21 +01:00
};
2021-06-24 00:18:43 +01:00
cargoSha256 = "00p2rwqrax99kwadc8bfq8pbcijals2nzpx43wb03kwxl4955wn9";
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
cargoBuildFlags = [ "--features=ftdi" ];
2020-08-24 12:07:21 +01:00
meta = with lib; {
description = "A cargo extension for working with microcontrollers";
homepage = "https://probe.rs/";
2020-08-24 12:07:21 +01:00
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ fooker ];
};
}