2021-01-25 08:26:54 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub
|
2020-03-13 23:49:38 +00:00
|
|
|
, cmake, gcc-arm-embedded, python3Packages
|
|
|
|
, qtbase, qtmultimedia, qttranslations, SDL, gtest
|
2017-11-27 04:02:34 +00:00
|
|
|
, dfu-util, avrdude
|
|
|
|
}:
|
|
|
|
|
2020-03-13 23:49:38 +00:00
|
|
|
mkDerivation rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "opentx";
|
2021-08-01 01:24:42 +01:00
|
|
|
version = "2.3.14";
|
2017-11-27 04:02:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opentx";
|
|
|
|
repo = "opentx";
|
2021-08-01 01:24:42 +01:00
|
|
|
# 2.3.14 release tag points to the commit before the one that updates the
|
|
|
|
# version number.
|
|
|
|
# rev = "release/${version}";
|
|
|
|
rev = "1e09791a1e2fe2a0ca9835019d634a4c6a4fa3bf";
|
|
|
|
sha256 = "0mhzp1j6nmqvkjxg8lv8xa637m1lavdsak30mdlq0g25dhwg6k92";
|
2017-11-27 04:02:34 +00:00
|
|
|
};
|
|
|
|
|
2020-03-13 23:49:38 +00:00
|
|
|
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ];
|
2017-11-27 04:02:34 +00:00
|
|
|
|
2020-03-13 23:49:38 +00:00
|
|
|
buildInputs = [ qtbase qtmultimedia qttranslations SDL ];
|
2017-11-27 04:02:34 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2020-03-13 23:49:38 +00: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 04:02:34 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2018-12-27 11:40:50 +00:00
|
|
|
"-DGTEST_ROOT=${gtest.src}/googletest"
|
2020-03-13 23:49:38 +00:00
|
|
|
"-DQT_TRANSLATIONS_DIR=${qttranslations}/translations"
|
2017-11-27 04:02:34 +00: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"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-27 04:02:34 +00:00
|
|
|
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-13 23:49:38 +00:00
|
|
|
homepage = "https://www.open-tx.org/";
|
2021-08-07 20:54:14 +01:00
|
|
|
license = licenses.gpl2Only;
|
2020-03-13 23:49:38 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
|
|
|
|
maintainers = with maintainers; [ elitak lopsided98 ];
|
2017-11-27 04:02:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|