Permalink
Browse files

qgroundcontrol: 2.9.4 -> 3.2.7, unbreak build

  • Loading branch information...
adisbladis committed Jan 12, 2018
1 parent cad14c7 commit 5f232de6cda58185c4a0a4f3d4a73b9e9f2856be
Showing with 20 additions and 38 deletions.
  1. +19 −37 pkgs/applications/science/robotics/qgroundcontrol/default.nix
  2. +1 −1 pkgs/top-level/all-packages.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchgit, git, espeak, SDL, udev, doxygen, cmake
{ stdenv, fetchgit, git, espeak, SDL2, udev, doxygen, cmake
, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake
, makeWrapper, lndir
, gst_all_1, qt-gstreamer1, pkgconfig, glibc
, version ? "2.9.4"
}:
stdenv.mkDerivation rec {
name = "qgroundcontrol-${version}";
version = "3.2.7";
qtInputs = [
qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
@@ -19,72 +19,54 @@ stdenv.mkDerivation rec {
];
enableParallelBuilding = true;
buildInputs = [ SDL udev doxygen git ] ++ gstInputs ++ qtInputs;
buildInputs = [ SDL2 udev doxygen git ] ++ gstInputs ++ qtInputs;
nativeBuildInputs = [ pkgconfig makeWrapper qmake ];
patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ];
postPatch = ''
sed '1i#include <cmath>' -i src/Vehicle/Vehicle.cc \
-i src/comm/{QGCFlightGearLink,QGCJSBSimLink}.cc \
-i src/{uas/UAS,ui/QGCDataPlot2D}.cc
'';
preConfigure = ''
mkdir build
cd build
'';
qmakeFlags = [ "../qgroundcontrol.pro" ];
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 qgroundcontrol.desktop $out/share/applications
cp -v deploy/qgroundcontrol.desktop $out/share/applications
mkdir -p $out/bin
cp -v build/release/qgroundcontrol "$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
# we need to link to our Qt deps in our own output if we want
# this package to work without being installed as a system pkg
mkdir -p $out/lib/qt-$qtCompatVersion $out/etc/xdg
for pkg in $qtInputs; do
if [[ -d $pkg/lib/qt-$qtCompatVersion ]]; then
for dir in lib/qt-$qtCompatVersion share etc/xdg; do
if [[ -d $pkg/$dir ]]; then
${lndir}/bin/lndir "$pkg/$dir" "$out/$dir"
fi
done
fi
done
'';
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 = "0isr0zamhvr853c94lblazkilil6zzmvf7afs3mxgn07jn9wrqz3";
sha256 = "1sla3sgj2p3h87d7kcaj53f8z5xzyadvsqlqzgh4d2n1f7sikdc5";
fetchSubmodules = true;
};
meta = {
meta = with stdenv.lib; {
description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
homepage = http://qgroundcontrol.org/;
license = stdenv.lib.licenses.gpl3Plus;
platforms = with stdenv.lib.platforms; linux;
maintainers = with stdenv.lib.maintainers; [ pxc ];
broken = true; # relies improperly on private Qt 5.5 headers
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ pxc ];
};
}
@@ -16604,7 +16604,7 @@ with pkgs;
qgis = callPackage ../applications/gis/qgis {};
qgroundcontrol = libsForQt56.callPackage ../applications/science/robotics/qgroundcontrol { };
qgroundcontrol = libsForQt5.callPackage ../applications/science/robotics/qgroundcontrol { };
qjackctl = libsForQt5.callPackage ../applications/audio/qjackctl { };

0 comments on commit 5f232de

Please sign in to comment.