1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00
nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix

73 lines
2 KiB
Nix

{ stdenv, fetchgit, git, SDL2, udev, doxygen
, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake, qtspeech
, makeWrapper
, gst_all_1, pkgconfig
}:
stdenv.mkDerivation rec {
name = "qgroundcontrol-${version}";
version = "3.3.0";
qtInputs = [
qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
qtquick1 qtquickcontrols qtgraphicaleffects qtspeech
];
gstInputs = with gst_all_1; [
gstreamer gst-plugins-base
];
enableParallelBuilding = true;
buildInputs = [ SDL2 udev doxygen git ] ++ gstInputs ++ qtInputs;
nativeBuildInputs = [ pkgconfig makeWrapper qmake ];
preConfigure = ''
mkdir build
cd build
'';
qmakeFlags = [
# Default install tries to copy Qt files into package
"CONFIG+=QGC_DISABLE_BUILD_SETUP"
"../qgroundcontrol.pro"
];
installPhase = ''
cd ..
mkdir -p $out/share/applications
cp -v deploy/qgroundcontrol.desktop $out/share/applications
mkdir -p $out/bin
cp -v build/release/QGroundControl "$out/bin/"
mkdir -p $out/share/qgroundcontrol
cp -rv resources/ $out/share/qgroundcontrol
mkdir -p $out/share/pixmaps
cp -v resources/icons/qgroundcontrol.png $out/share/pixmaps
'';
postInstall = ''
wrapProgram "$out/bin/qgroundcontrol" \
--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 = "0abjm0wywp24qlgg9w8g35ijprjg5csq4fgba9caaiwvmpfbhmpw";
fetchSubmodules = true;
};
meta = with stdenv.lib; {
description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
homepage = http://qgroundcontrol.org/;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ pxc ];
};
}