qgroundcontrol: 3.5.5 -> 4.0.8

This commit is contained in:
Ben Wolsieffer 2020-06-04 17:41:40 -04:00
parent cda41cf743
commit 5d3c56822a

View File

@ -1,34 +1,31 @@
{ lib, mkDerivation, fetchgit, SDL2 { lib, mkDerivation, fetchgit, SDL2
, qtbase, qtcharts, qtlocation, qtserialport, qtsvg, qtquickcontrols2 , qtbase, qtcharts, qtlocation, qtserialport, qtsvg, qtquickcontrols2
, qtgraphicaleffects, qtspeech, qmake , qtgraphicaleffects, qtspeech, qtx11extras, qmake, qttools
, makeWrapper , gst_all_1, wayland, pkgconfig
, gst_all_1, pkgconfig
}: }:
mkDerivation rec { mkDerivation rec {
pname = "qgroundcontrol"; pname = "qgroundcontrol";
version = "3.5.5"; version = "4.0.8";
qtInputs = [ qtInputs = [
qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2 qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2
qtgraphicaleffects qtspeech qtgraphicaleffects qtspeech qtx11extras
]; ];
gstInputs = with gst_all_1; [ gstInputs = with gst_all_1; [
gstreamer gst-plugins-base gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad wayland
]; ];
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ SDL2 ] ++ gstInputs ++ qtInputs; buildInputs = [ SDL2 ] ++ gstInputs ++ qtInputs;
nativeBuildInputs = [ pkgconfig makeWrapper qmake ]; nativeBuildInputs = [ pkgconfig qmake qttools ];
preConfigure = '' preConfigure = ''
mkdir build mkdir build
cd build cd build
''; '';
NIX_CFLAGS_COMPILE = [ "-Wno-address-of-packed-member" ]; # Don't litter logs with these warnings
qmakeFlags = [ qmakeFlags = [
# Default install tries to copy Qt files into package # Default install tries to copy Qt files into package
"CONFIG+=QGC_DISABLE_BUILD_SETUP" "CONFIG+=QGC_DISABLE_BUILD_SETUP"
@ -36,6 +33,8 @@ mkDerivation rec {
]; ];
installPhase = '' installPhase = ''
runHook preInstall
cd .. cd ..
mkdir -p $out/share/applications mkdir -p $out/share/applications
@ -50,18 +49,19 @@ mkDerivation rec {
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
runHook postInstall
''; '';
postInstall = '' postInstall = ''
wrapProgram "$out/bin/qgroundcontrol" \ qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
--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 = "v${version}"; rev = "v${version}";
sha256 = "05zy6w9lwwh254wa8c6wysa67kk0flywcvipii9b1rmy47slflhs"; sha256 = "0jr9jpjqdwizsvh9zm0fdp8k2r4536m40dxrn30fbr3ba8vnzkgq";
fetchSubmodules = true; fetchSubmodules = true;
}; };
@ -70,6 +70,6 @@ mkDerivation rec {
homepage = "http://qgroundcontrol.org/"; homepage = "http://qgroundcontrol.org/";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ lopsided98 ];
}; };
} }