1{ lib
2, stdenv
3, fetchFromGitHub
4, czmq
5, libusb1
6, ncurses
7}:
8
9stdenv.mkDerivation rec {
10 pname = "orbuculum";
11 version = "2.0.0";
12
13 src = fetchFromGitHub {
14 owner = "orbcode";
15 repo = pname;
16 rev = "V${version}";
17 sha256 = "sha256-aMMXfrBQQ9oOx17MUKmqe5vdTpxhBGM5mVfAel0y0a0=";
18 };
19
20 buildInputs = [
21 czmq
22 libusb1
23 ncurses
24 ];
25
26 installFlags = [
27 "INSTALL_ROOT=$(out)/"
28 ];
29
30 postInstall = ''
31 mkdir -p $out/etc/udev/rules.d/
32 cp $src/Support/60-orbcode.rules $out/etc/udev/rules.d/
33 '';
34
35 meta = with lib; {
36 description = "Cortex M SWO SWV Demux and Postprocess for the ORBTrace";
37 homepage = "https://orbcode.org";
38 changelog = "https://github.com/orbcode/orbuculum/blob/V${version}/CHANGES.md";
39 license = licenses.bsd3;
40 maintainers = with maintainers; [ newam ];
41 platforms = platforms.linux;
42 };
43}