about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/rtthost/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/rtthost/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/rtthost/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/rtthost/default.nix b/nixpkgs/pkgs/development/tools/rust/rtthost/default.nix
new file mode 100644
index 000000000000..3389ff7d76c5
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/rust/rtthost/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchCrate
+, pkg-config
+, libusb1
+, DarwinTools
+, AppKit
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rtthost";
+  version = "0.21.0";
+
+  src = fetchCrate {
+    inherit pname version;
+    hash = "sha256-Vp2TXKDr6Mu4CD6RlHjTL04FIShzKXwNZmu0PIqx1FY=";
+  };
+
+  cargoHash = "sha256-XRxijak3kBMYCx9u39OWvqz3tjnKipjcV3DPEUBYrvQ=";
+
+  nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ];
+
+  buildInputs = [ libusb1 ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
+
+  meta = with lib; {
+    description = "RTT (Real-Time Transfer) client";
+    homepage = "https://probe.rs/";
+    changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/CHANGELOG.md";
+    license = with licenses; [ asl20 /* or */ mit ];
+    maintainers = with maintainers; [ samueltardieu ];
+  };
+}