2017-11-27 05:02:34 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
2018-10-12 22:21:26 +02:00
|
|
|
, cmake, gcc-arm-embedded, binutils-arm-embedded, python
|
2018-12-27 12:40:50 +01:00
|
|
|
, qt5, SDL, gtest
|
2017-11-27 05:02:34 +01:00
|
|
|
, dfu-util, avrdude
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
version = "2.2.1";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "opentx";
|
|
|
|
inherit version;
|
2017-11-27 05:02:34 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opentx";
|
|
|
|
repo = "opentx";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "01lnnkrxach21aivnx1k1iqhih02nixh8c4nk6rpw408p13him9g";
|
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-10-12 22:21:26 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
gcc-arm-embedded binutils-arm-embedded
|
|
|
|
];
|
2017-11-27 05:02:34 +01:00
|
|
|
|
|
|
|
buildInputs = with qt5; [
|
|
|
|
python python.pkgs.pyqt4
|
|
|
|
qtbase qtmultimedia qttranslations
|
2018-12-27 12:40:50 +01:00
|
|
|
SDL
|
2017-11-27 05:02:34 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i companion/src/burnconfigdialog.cpp -e 's|/usr/.*bin/dfu-util|${dfu-util}/bin/dfu-util|'
|
|
|
|
sed -i companion/src/burnconfigdialog.cpp -e 's|/usr/.*bin/avrdude|${avrdude}/bin/avrdude|'
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2018-12-27 12:40:50 +01:00
|
|
|
"-DGTEST_ROOT=${gtest.src}/googletest"
|
2017-11-27 05:02:34 +01:00
|
|
|
"-DQT_TRANSLATIONS_DIR=${qt5.qttranslations}/translations"
|
|
|
|
# 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"
|
2018-12-27 12:40:50 +01:00
|
|
|
"-DNANO=NO"
|
2017-11-27 05:02:34 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = https://open-tx.org/;
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ elitak ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|