nixpkgs/pkgs/development/embedded/orbuculum/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.1 KiB
Nix
Raw Normal View History

2022-08-19 02:42:09 +02:00
{ lib
, stdenv
, fetchFromGitHub
2023-07-04 06:20:19 +02:00
, meson
, ninja
, pkg-config
2022-08-19 02:42:09 +02:00
, czmq
, libusb1
, ncurses
2023-07-04 06:20:19 +02:00
, SDL2
2022-08-19 02:42:09 +02:00
}:
stdenv.mkDerivation rec {
pname = "orbuculum";
2023-07-04 06:20:19 +02:00
version = "2.1.0";
2022-08-19 02:42:09 +02:00
src = fetchFromGitHub {
owner = "orbcode";
repo = pname;
rev = "V${version}";
2023-07-04 06:20:19 +02:00
sha256 = "sha256-Ohcc8739W/EmDjOYhcMgzEPVhzbWrUYgsPLdy4qzxhY=";
2022-08-19 02:42:09 +02:00
};
2023-07-04 06:20:19 +02:00
prePatch = ''
substituteInPlace meson.build --replace \
"/etc/udev/rules.d" "$out/etc/udev/rules.d"
'';
nativeBuildInputs = [
meson
ninja
pkg-config
];
2022-08-19 02:42:09 +02:00
buildInputs = [
czmq
libusb1
ncurses
2023-07-04 06:20:19 +02:00
SDL2
2022-08-19 02:42:09 +02: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;
};
}