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

35 lines
866 B
Nix
Raw Normal View History

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, libusb1
, pkg-config
, rustfmt
2021-08-23 13:11:43 +01:00
, AppKit
}:
2020-08-24 12:07:33 +01:00
rustPlatform.buildRustPackage rec {
pname = "cargo-flash";
2021-11-25 15:48:49 +00:00
version = "0.12.0";
2020-08-24 12:07:33 +01:00
src = fetchFromGitHub {
owner = "probe-rs";
repo = pname;
rev = "v${version}";
2021-11-25 15:48:49 +00:00
sha256 = "0s49q8x0iscy9rgn9zgymyg39cqm251a99m341znjn55lap3pdl8";
2020-08-24 12:07:33 +01:00
};
2021-11-25 15:48:49 +00:00
cargoSha256 = "0rb4s5bwjs7hri636r2viva96a6z9qjv9if6i220j9yglrvi7c8i";
2020-08-24 12:07:33 +01:00
nativeBuildInputs = [ pkg-config rustfmt ];
2021-10-13 01:39:48 +01:00
buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
2020-08-24 12:07:33 +01:00
meta = with lib; {
description = "A cargo extension for working with microcontrollers";
homepage = "https://probe.rs/";
2021-11-25 15:48:49 +00:00
changelog = "https://github.com/probe-rs/cargo-flash/blob/v${version}/CHANGELOG.md";
2020-08-24 12:07:33 +01:00
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ fooker ];
};
}