1{ lib, mkDerivation, fetchFromGitHub
2, cmake, gcc-arm-embedded, python3Packages
3, qtbase, qtmultimedia, qttranslations, SDL, gtest
4, dfu-util
5}:
6
7mkDerivation rec {
8 pname = "edgetx";
9 version = "2.7.2";
10
11 src = fetchFromGitHub {
12 owner = "EdgeTX";
13 repo = pname;
14 rev = "v${version}";
15 fetchSubmodules = true;
16 sha256 = "sha256-bKMAyONy1Udd+2nDVEMrtIsnfqrNuBVMWU7nCqvZ+3E=";
17 };
18
19 nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ];
20
21 buildInputs = [ qtbase qtmultimedia qttranslations SDL ];
22
23 postPatch = ''
24 sed -i companion/src/burnconfigdialog.cpp \
25 -e 's|/usr/.*bin/dfu-util|${dfu-util}/bin/dfu-util|'
26 '';
27
28 cmakeFlags = [
29 "-DGTEST_ROOT=${gtest.src}/googletest"
30 "-DQT_TRANSLATIONS_DIR=${qttranslations}/translations"
31 "-DDFU_UTIL_PATH=${dfu-util}/bin/dfu-util"
32 # file RPATH_CHANGE could not write new RPATH
33 "-DCMAKE_SKIP_BUILD_RPATH=ON"
34 ];
35
36 meta = with lib; {
37 description = "EdgeTX Companion transmitter support software";
38 longDescription = ''
39 EdgeTX Companion is used for many different tasks like loading EdgeTX
40 firmware to the radio, backing up model settings, editing settings and
41 running radio simulators.
42 '';
43 homepage = "https://edgetx.org/";
44 license = licenses.gpl2Only;
45 platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
46 maintainers = with maintainers; [ elitak lopsided98 wucke13 ];
47 };
48
49}