2020-03-14 00:49:38 +01:00
|
|
|
{ stdenv, mkDerivation, fetchFromGitHub
|
|
|
|
, cmake, gcc-arm-embedded, python3Packages
|
|
|
|
, qtbase, qtmultimedia, qttranslations, SDL, gtest
|
2017-11-27 05:02:34 +01:00
|
|
|
, dfu-util, avrdude
|
|
|
|
}:
|
|
|
|
|
2020-03-14 00:49:38 +01:00
|
|
|
mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "opentx";
|
2020-10-26 02:23:54 +01:00
|
|
|
version = "2.3.10";
|
2017-11-27 05:02:34 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opentx";
|
|
|
|
repo = "opentx";
|
2020-04-02 00:42:57 +02:00
|
|
|
rev = "release/${version}";
|
2020-10-26 02:23:54 +01:00
|
|
|
sha256 = "1pp3k1802gl1rji98clv17wj0619dliq821mpi4446lk22q692yq";
|
2017-11-27 05:02:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-03-14 00:49:38 +01:00
|
|
|
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ];
|
2017-11-27 05:02:34 +01:00
|
|
|
|
2020-03-14 00:49:38 +01:00
|
|
|
buildInputs = [ qtbase qtmultimedia qttranslations SDL ];
|
2017-11-27 05:02:34 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2020-03-14 00:49:38 +01:00
|
|
|
sed -i companion/src/burnconfigdialog.cpp \
|
|
|
|
-e 's|/usr/.*bin/dfu-util|${dfu-util}/bin/dfu-util|' \
|
|
|
|
-e 's|/usr/.*bin/avrdude|${avrdude}/bin/avrdude|'
|
2017-11-27 05:02:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2018-12-27 12:40:50 +01:00
|
|
|
"-DGTEST_ROOT=${gtest.src}/googletest"
|
2020-03-14 00:49:38 +01:00
|
|
|
"-DQT_TRANSLATIONS_DIR=${qttranslations}/translations"
|
2017-11-27 05:02:34 +01:00
|
|
|
# XXX I would prefer to include these here, though we will need to file a bug upstream to get that changed.
|
|
|
|
#"-DDFU_UTIL_PATH=${dfu-util}/bin/dfu-util"
|
|
|
|
#"-DAVRDUDE_PATH=${avrdude}/bin/avrdude"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "OpenTX Companion transmitter support software";
|
|
|
|
longDescription = ''
|
|
|
|
OpenTX Companion is used for many different tasks like loading OpenTX
|
|
|
|
firmware to the radio, backing up model settings, editing settings and
|
|
|
|
running radio simulators.
|
|
|
|
'';
|
2020-03-14 00:49:38 +01:00
|
|
|
homepage = "https://www.open-tx.org/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
|
|
|
|
maintainers = with maintainers; [ elitak lopsided98 ];
|
2017-11-27 05:02:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|