qgroundcontrol: 2.9.4 -> 3.2.7, unbreak build
This commit is contained in:
parent
cad14c782b
commit
5f232de6cd
|
@ -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
|
, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
|
||||||
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake
|
, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake
|
||||||
, makeWrapper, lndir
|
, makeWrapper, lndir
|
||||||
, gst_all_1, qt-gstreamer1, pkgconfig, glibc
|
, gst_all_1, qt-gstreamer1, pkgconfig, glibc
|
||||||
, version ? "2.9.4"
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "qgroundcontrol-${version}";
|
name = "qgroundcontrol-${version}";
|
||||||
|
version = "3.2.7";
|
||||||
|
|
||||||
qtInputs = [
|
qtInputs = [
|
||||||
qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
|
qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
|
||||||
|
@ -19,72 +19,54 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
buildInputs = [ SDL udev doxygen git ] ++ gstInputs ++ qtInputs;
|
buildInputs = [ SDL2 udev doxygen git ] ++ gstInputs ++ qtInputs;
|
||||||
nativeBuildInputs = [ pkgconfig makeWrapper qmake ];
|
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 = ''
|
preConfigure = ''
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
'';
|
'';
|
||||||
|
|
||||||
qmakeFlags = [ "../qgroundcontrol.pro" ];
|
qmakeFlags = [
|
||||||
|
# Default install tries to copy Qt files into package
|
||||||
|
"CONFIG+=QGC_DISABLE_BUILD_SETUP"
|
||||||
|
"../qgroundcontrol.pro"
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
cp -v qgroundcontrol.desktop $out/share/applications
|
cp -v deploy/qgroundcontrol.desktop $out/share/applications
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp -v build/release/qgroundcontrol "$out/bin/"
|
cp -v build/release/QGroundControl "$out/bin/"
|
||||||
|
|
||||||
mkdir -p $out/share/qgroundcontrol
|
mkdir -p $out/share/qgroundcontrol
|
||||||
cp -rv resources/ $out/share/qgroundcontrol
|
cp -rv resources/ $out/share/qgroundcontrol
|
||||||
|
|
||||||
mkdir -p $out/share/pixmaps
|
mkdir -p $out/share/pixmaps
|
||||||
cp -v resources/icons/qgroundcontrol.png $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 = ''
|
postInstall = ''
|
||||||
wrapProgram "$out/bin/qgroundcontrol" \
|
wrapProgram "$out/bin/qgroundcontrol" \
|
||||||
--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
|
--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
# TODO: package mavlink so we can build from a normal source tarball
|
# TODO: package mavlink so we can build from a normal source tarball
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/mavlink/qgroundcontrol.git";
|
url = "https://github.com/mavlink/qgroundcontrol.git";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
sha256 = "0isr0zamhvr853c94lblazkilil6zzmvf7afs3mxgn07jn9wrqz3";
|
sha256 = "1sla3sgj2p3h87d7kcaj53f8z5xzyadvsqlqzgh4d2n1f7sikdc5";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
|
description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
|
||||||
homepage = http://qgroundcontrol.org/;
|
homepage = http://qgroundcontrol.org/;
|
||||||
license = stdenv.lib.licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with stdenv.lib.maintainers; [ pxc ];
|
maintainers = with maintainers; [ pxc ];
|
||||||
broken = true; # relies improperly on private Qt 5.5 headers
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16604,7 +16604,7 @@ with pkgs;
|
||||||
|
|
||||||
qgis = callPackage ../applications/gis/qgis {};
|
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 { };
|
qjackctl = libsForQt5.callPackage ../applications/audio/qjackctl { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue