2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2022-09-09 14:08:57 +00:00
|
|
|
, czmq
|
|
|
|
, libusb1
|
|
|
|
, ncurses
|
2023-07-15 17:15:38 +00:00
|
|
|
, SDL2
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "orbuculum";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2.1.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "orbcode";
|
|
|
|
repo = pname;
|
|
|
|
rev = "V${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-Ohcc8739W/EmDjOYhcMgzEPVhzbWrUYgsPLdy4qzxhY=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace meson.build --replace \
|
|
|
|
"/etc/udev/rules.d" "$out/etc/udev/rules.d"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [
|
|
|
|
czmq
|
|
|
|
libusb1
|
|
|
|
ncurses
|
2023-07-15 17:15:38 +00:00
|
|
|
SDL2
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"INSTALL_ROOT=$(out)/"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/etc/udev/rules.d/
|
|
|
|
cp $src/Support/60-orbcode.rules $out/etc/udev/rules.d/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Cortex M SWO SWV Demux and Postprocess for the ORBTrace";
|
|
|
|
homepage = "https://orbcode.org";
|
|
|
|
changelog = "https://github.com/orbcode/orbuculum/blob/V${version}/CHANGES.md";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ newam ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|