nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix

73 lines
2 KiB
Nix
Raw Normal View History

{ stdenv, fetchgit, git, espeak, SDL2, udev, doxygen, cmake
2017-06-02 17:40:19 +02:00
, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake
2017-05-17 21:26:11 +02:00
, makeWrapper, lndir
2017-06-02 17:40:19 +02:00
, gst_all_1, qt-gstreamer1, pkgconfig, glibc
2016-03-25 00:06:20 +01:00
}:
stdenv.mkDerivation rec {
name = "qgroundcontrol-${version}";
version = "3.2.7";
2016-03-25 00:06:20 +01:00
qtInputs = [
2017-06-02 17:40:19 +02:00
qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
2016-03-25 00:06:20 +01:00
qtquick1 qtquickcontrols qtgraphicaleffects
];
gstInputs = with gst_all_1; [
gstreamer gst-plugins-base
];
enableParallelBuilding = true;
buildInputs = [ SDL2 udev doxygen git ] ++ gstInputs ++ qtInputs;
2017-05-17 21:26:11 +02:00
nativeBuildInputs = [ pkgconfig makeWrapper qmake ];
2016-03-25 00:06:20 +01:00
2016-05-29 18:51:07 +02:00
preConfigure = ''
mkdir build
cd build
'';
qmakeFlags = [
# Default install tries to copy Qt files into package
"CONFIG+=QGC_DISABLE_BUILD_SETUP"
"../qgroundcontrol.pro"
];
2016-05-29 18:51:07 +02:00
2016-03-25 00:06:20 +01:00
installPhase = ''
2016-05-29 18:51:07 +02:00
cd ..
2016-03-25 00:06:20 +01:00
mkdir -p $out/share/applications
cp -v deploy/qgroundcontrol.desktop $out/share/applications
2016-03-25 00:06:20 +01:00
mkdir -p $out/bin
cp -v build/release/QGroundControl "$out/bin/"
2016-03-25 00:06:20 +01:00
mkdir -p $out/share/qgroundcontrol
cp -rv resources/ $out/share/qgroundcontrol
2016-03-25 00:06:20 +01:00
mkdir -p $out/share/pixmaps
cp -v resources/icons/qgroundcontrol.png $out/share/pixmaps
'';
postInstall = ''
2017-05-17 21:26:11 +02:00
wrapProgram "$out/bin/qgroundcontrol" \
2016-03-25 00:06:20 +01: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}";
sha256 = "1sla3sgj2p3h87d7kcaj53f8z5xzyadvsqlqzgh4d2n1f7sikdc5";
2016-03-25 00:06:20 +01:00
fetchSubmodules = true;
};
meta = with stdenv.lib; {
description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
2016-03-25 00:06:20 +01:00
homepage = http://qgroundcontrol.org/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ pxc ];
2016-03-25 00:06:20 +01:00
};
}