![Jonathan Ringer](/assets/img/avatar_default.png)
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
77 lines
2 KiB
Nix
77 lines
2 KiB
Nix
{ lib, mkDerivation, fetchFromGitHub, SDL2
|
|
, qtbase, qtcharts, qtlocation, qtserialport, qtsvg, qtquickcontrols2
|
|
, qtgraphicaleffects, qtspeech, qtx11extras, qmake, qttools
|
|
, gst_all_1, wayland, pkg-config
|
|
}:
|
|
|
|
mkDerivation rec {
|
|
pname = "qgroundcontrol";
|
|
version = "4.0.11";
|
|
|
|
qtInputs = [
|
|
qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2
|
|
qtgraphicaleffects qtspeech qtx11extras
|
|
];
|
|
|
|
gstInputs = with gst_all_1; [
|
|
gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad wayland
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
buildInputs = [ SDL2 ] ++ gstInputs ++ qtInputs;
|
|
nativeBuildInputs = [ pkg-config qmake qttools ];
|
|
|
|
preConfigure = ''
|
|
mkdir build
|
|
cd build
|
|
'';
|
|
|
|
qmakeFlags = [
|
|
# Default install tries to copy Qt files into package
|
|
"CONFIG+=QGC_DISABLE_BUILD_SETUP"
|
|
"../qgroundcontrol.pro"
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
cd ..
|
|
|
|
mkdir -p $out/share/applications
|
|
sed 's/Exec=.*$/Exec=QGroundControl/g' --in-place deploy/qgroundcontrol.desktop
|
|
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
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
postInstall = ''
|
|
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
|
|
'';
|
|
|
|
# TODO: package mavlink so we can build from a normal source tarball
|
|
src = fetchFromGitHub {
|
|
owner = "mavlink";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "14pk1vmcpg2cc5p100chbhnynclcwyqmyb2n2w11vvk0l2c9z1gz";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
meta = with 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; [ lopsided98 ];
|
|
};
|
|
}
|