@@ -0,0 +1,34 @@
1+{ lib, stdenv, fetchFromGitHub, pkg-config, cairo }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "inav-blackbox-tools";
5+ version = "unstable-2021-04-22";
6+
7+ src = fetchFromGitHub {
8+ owner = "iNavFlight";
9+ repo = "blackbox-tools";
10+ rev = "0109e2fb9b44d593e60bca4cef4098d83c55c373";
11+ sha256 = "1rdlw74dqq0hahnka2w2pgvs172vway2x6v8byxl2s773l22k4ln";
12+ };
13+
14+ nativeBuildInputs = [ pkg-config ];
15+
16+ buildInputs = [ cairo ];
17+
18+ installPhase = ''
19+ runHook preInstall
20+
21+ mkdir -p "$out/bin"
22+ cp obj/{blackbox_decode,blackbox_render,encoder_testbed} "$out/bin"
23+
24+ runHook postInstall
25+ '';
26+
27+ meta = with lib; {
28+ description = "Tools for working with blackbox flight logs";
29+ homepage = "https://github.com/inavflight/blackbox-tools";
30+ license = licenses.gpl3Only;
31+ maintainers = with maintainers; [ expipiplus1 ];
32+ platforms = platforms.all;
33+ };
34+}