nixpkgs/pkgs/development/tools/rust/cargo-flash/default.nix

36 lines
813 B
Nix
Raw Normal View History

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, libusb1
, openssl
, pkg-config
, rustfmt
, Security
2021-08-23 12:11:43 +00:00
, AppKit
}:
2020-08-24 11:07:33 +00:00
rustPlatform.buildRustPackage rec {
pname = "cargo-flash";
2021-06-24 05:58:52 +00:00
version = "0.11.0";
2020-08-24 11:07:33 +00:00
src = fetchFromGitHub {
owner = "probe-rs";
repo = pname;
rev = "v${version}";
2021-06-24 05:58:52 +00:00
sha256 = "sha256-yTtnRdDy3wGBe0SlO0165uooWu6ZMhUQw3hdDUK1e8A=";
2020-08-24 11:07:33 +00:00
};
2021-06-24 05:58:52 +00:00
cargoSha256 = "sha256-f5vUMdyz3vDh2yE0pMKZiknsqTAKkuvTCtlgb6/gaLc=";
2020-08-24 11:07:33 +00:00
nativeBuildInputs = [ pkg-config rustfmt ];
2021-08-23 12:11:43 +00:00
buildInputs = [ libusb1 openssl ] ++ lib.optionals stdenv.isDarwin [ Security AppKit ];
2020-08-24 11:07:33 +00:00
meta = with lib; {
description = "A cargo extension for working with microcontrollers";
homepage = "https://probe.rs/";
2020-08-24 11:07:33 +00:00
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ fooker ];
};
}