1{ lib
2, stdenv
3, rustPlatform
4, fetchCrate
5, pkg-config
6, DarwinTools
7, libusb1
8, libiconv
9, AppKit
10, IOKit
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "probe-run";
15 version = "0.3.11";
16
17 src = fetchCrate {
18 inherit pname version;
19 hash = "sha256-RlmN2PV5Z/+NTYia7LhrAW437bsg6oUxlQ1qcbZuq0o=";
20 };
21
22 cargoHash = "sha256-MG3xHArNEqXs0vC5sSyaBM3421yJ25nazvBNQVcs4v0=";
23
24 nativeBuildInputs = [
25 pkg-config
26 ] ++ lib.optionals stdenv.isDarwin [
27 DarwinTools
28 ];
29
30 buildInputs = [
31 libusb1
32 ] ++ lib.optionals stdenv.isDarwin [
33 libiconv
34 AppKit
35 IOKit
36 ];
37
38 meta = with lib; {
39 description = "Run embedded programs just like native ones";
40 mainProgram = "probe-run";
41 homepage = "https://github.com/knurling-rs/probe-run";
42 changelog = "https://github.com/knurling-rs/probe-run/blob/v${version}/CHANGELOG.md";
43 license = with licenses; [ asl20 /* or */ mit ];
44 maintainers = with maintainers; [ hoverbear newam ];
45 };
46}