2021-02-05 17:12:51 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, cmake, gcc-arm-embedded, python3Packages
|
2023-10-09 19:29:22 +00:00
|
|
|
, qtbase, qtmultimedia, qttools, SDL, gtest
|
2020-04-24 23:36:52 +00:00
|
|
|
, dfu-util, avrdude
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "opentx";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "2.3.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opentx";
|
|
|
|
repo = "opentx";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "release/${version}";
|
|
|
|
sha256 = "sha256-F3zykJhKuIpLQSTjn7mcdjEmgRAlwCZpkTaKQR9ve3g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow qttools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
buildInputs = [ qtbase qtmultimedia SDL ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
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|'
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DGTEST_ROOT=${gtest.src}/googletest"
|
|
|
|
# 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"
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
# file RPATH_CHANGE could not write new RPATH
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.open-tx.org/";
|
2021-08-08 23:34:03 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
|
|
|
|
maintainers = with maintainers; [ elitak lopsided98 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|