nixpkgs/pkgs/applications/misc/opentx/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, mkDerivation, fetchFromGitHub
2020-03-13 23:49:38 +00:00
, cmake, gcc-arm-embedded, python3Packages
, qtbase, qtmultimedia, qttranslations, SDL, gtest
, dfu-util, avrdude
}:
2020-03-13 23:49:38 +00:00
mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "opentx";
2022-05-16 00:46:43 +00:00
version = "2.3.15";
src = fetchFromGitHub {
owner = "opentx";
repo = "opentx";
2022-05-16 00:46:43 +00:00
rev = "release/${version}";
sha256 = "sha256-F3zykJhKuIpLQSTjn7mcdjEmgRAlwCZpkTaKQR9ve3g=";
};
2020-03-13 23:49:38 +00:00
nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ];
2020-03-13 23:49:38 +00:00
buildInputs = [ qtbase qtmultimedia qttranslations SDL ];
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|'
'';
cmakeFlags = [
"-DGTEST_ROOT=${gtest.src}/googletest"
2020-03-13 23:49:38 +00:00
"-DQT_TRANSLATIONS_DIR=${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"
# file RPATH_CHANGE could not write new RPATH
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
meta = with 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-13 23:49:38 +00:00
homepage = "https://www.open-tx.org/";
2021-08-07 19:54:14 +00: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 ];
};
}