2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchgit, git, SDL2, udev, doxygen
|
2017-06-02 16:40:19 +01:00
|
|
|
, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
|
2018-03-24 11:08:06 +00:00
|
|
|
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake, qtspeech
|
2018-07-21 01:44:44 +01:00
|
|
|
, makeWrapper
|
|
|
|
, gst_all_1, pkgconfig
|
2016-03-24 23:06:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "qgroundcontrol-${version}";
|
2018-03-24 11:08:06 +00:00
|
|
|
version = "3.3.0";
|
2016-03-24 23:06:20 +00:00
|
|
|
|
|
|
|
qtInputs = [
|
2017-06-02 16:40:19 +01:00
|
|
|
qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
|
2018-03-24 11:08:06 +00:00
|
|
|
qtquick1 qtquickcontrols qtgraphicaleffects qtspeech
|
2016-03-24 23:06:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
gstInputs = with gst_all_1; [
|
|
|
|
gstreamer gst-plugins-base
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2018-01-12 18:18:08 +00:00
|
|
|
buildInputs = [ SDL2 udev doxygen git ] ++ gstInputs ++ qtInputs;
|
2017-05-17 20:26:11 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper qmake ];
|
2016-03-24 23:06:20 +00:00
|
|
|
|
2016-05-29 17:51:07 +01:00
|
|
|
preConfigure = ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
'';
|
|
|
|
|
2018-01-12 18:18:08 +00:00
|
|
|
qmakeFlags = [
|
|
|
|
# Default install tries to copy Qt files into package
|
|
|
|
"CONFIG+=QGC_DISABLE_BUILD_SETUP"
|
|
|
|
"../qgroundcontrol.pro"
|
|
|
|
];
|
2016-05-29 17:51:07 +01:00
|
|
|
|
2016-03-24 23:06:20 +00:00
|
|
|
installPhase = ''
|
2016-05-29 17:51:07 +01:00
|
|
|
cd ..
|
2018-01-12 18:18:08 +00:00
|
|
|
|
2016-03-24 23:06:20 +00:00
|
|
|
mkdir -p $out/share/applications
|
2018-01-12 18:18:08 +00:00
|
|
|
cp -v deploy/qgroundcontrol.desktop $out/share/applications
|
|
|
|
|
2016-03-24 23:06:20 +00:00
|
|
|
mkdir -p $out/bin
|
2018-01-12 18:18:08 +00:00
|
|
|
cp -v build/release/QGroundControl "$out/bin/"
|
|
|
|
|
2016-03-24 23:06:20 +00:00
|
|
|
mkdir -p $out/share/qgroundcontrol
|
|
|
|
cp -rv resources/ $out/share/qgroundcontrol
|
2018-01-12 18:18:08 +00:00
|
|
|
|
2016-03-24 23:06:20 +00:00
|
|
|
mkdir -p $out/share/pixmaps
|
|
|
|
cp -v resources/icons/qgroundcontrol.png $out/share/pixmaps
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2017-05-17 20:26:11 +01:00
|
|
|
wrapProgram "$out/bin/qgroundcontrol" \
|
2016-03-24 23:06:20 +00:00
|
|
|
--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# TODO: package mavlink so we can build from a normal source tarball
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/mavlink/qgroundcontrol.git";
|
|
|
|
rev = "refs/tags/v${version}";
|
2018-03-24 11:08:06 +00:00
|
|
|
sha256 = "0abjm0wywp24qlgg9w8g35ijprjg5csq4fgba9caaiwvmpfbhmpw";
|
2016-03-24 23:06:20 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2018-01-12 18:18:08 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
|
2016-03-24 23:06:20 +00:00
|
|
|
homepage = http://qgroundcontrol.org/;
|
2018-01-12 18:18:08 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ pxc ];
|
2016-03-24 23:06:20 +00:00
|
|
|
};
|
|
|
|
}
|