Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, rustPlatform 4, fetchCrate 5, libusb1 6, libftdi1 7, pkg-config 8, DarwinTools 9, AppKit 10}: 11 12rustPlatform.buildRustPackage rec { 13 pname = "cargo-embed"; 14 version = "0.18.0"; 15 16 src = fetchCrate { 17 inherit pname version; 18 hash = "sha256-Z8PoM1zlbTYH1oF9nHzu3QykHQ+IXewrXAOieLguFuQ="; 19 }; 20 21 cargoHash = "sha256-xL1QbeOLnAJVcBdp2NIMlT5LMxkNwA99VzCHV9NjwUo="; 22 23 nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 24 25 buildInputs = [ libusb1 libftdi1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ]; 26 27 buildFeatures = [ "ftdi" ]; 28 29 meta = with lib; { 30 description = "A cargo extension for working with microcontrollers"; 31 homepage = "https://probe.rs/"; 32 changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/cargo-embed/CHANGELOG.md"; 33 license = with licenses; [ asl20 /* or */ mit ]; 34 maintainers = with maintainers; [ fooker newam ]; 35 }; 36}