mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
nixos/qgroundcontrol: fix qgroundcontrol module (#336183)
This commit is contained in:
commit
13659a54fc
3 changed files with 35 additions and 7 deletions
|
@ -40,13 +40,8 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Security wrapper
|
# Add to systemPackages for desktop entry file
|
||||||
security.wrappers.qgroundcontrol = {
|
environment.systemPackages = [ cfg.package ];
|
||||||
source = lib.getExe cfg.package;
|
|
||||||
owner = "root"; # Sensible default; not setuid so this is not a security risk
|
|
||||||
group = "tty";
|
|
||||||
setgid = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.maintainers = pkgs.qgroundcontrol.meta.maintainers;
|
meta.maintainers = pkgs.qgroundcontrol.meta.maintainers;
|
||||||
|
|
29
pkgs/by-name/qg/qgroundcontrol/disable-bad-message.patch
Normal file
29
pkgs/by-name/qg/qgroundcontrol/disable-bad-message.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc
|
||||||
|
index 7992ed00d..a9e0f0ba7 100644
|
||||||
|
--- a/src/QGCApplication.cc
|
||||||
|
+++ b/src/QGCApplication.cc
|
||||||
|
@@ -207,24 +207,6 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
|
||||||
|
"sudo apt-get remove modemmanager</pre>").arg(qgcApp()->applicationName())));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
- // Determine if we have the correct permissions to access USB serial devices
|
||||||
|
- QFile permFile("/etc/group");
|
||||||
|
- if(permFile.open(QIODevice::ReadOnly)) {
|
||||||
|
- while(!permFile.atEnd()) {
|
||||||
|
- QString line = permFile.readLine();
|
||||||
|
- if (line.contains("dialout") && !line.contains(getenv("USER"))) {
|
||||||
|
- permFile.close();
|
||||||
|
- _exitWithError(QString(
|
||||||
|
- tr("The current user does not have the correct permissions to access serial devices. "
|
||||||
|
- "You should also remove modemmanager since it also interferes.<br/><br/>"
|
||||||
|
- "If you are using Ubuntu, execute the following commands to fix these issues:<br/>"
|
||||||
|
- "<pre>sudo usermod -a -G dialout $USER<br/>"
|
||||||
|
- "sudo apt-get remove modemmanager</pre>")));
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- permFile.close();
|
||||||
|
- }
|
||||||
|
|
||||||
|
// Always set style to default, this way QT_QUICK_CONTROLS_STYLE environment variable doesn't cause random changes in ui
|
||||||
|
QQuickStyle::setStyle("Default");
|
|
@ -91,6 +91,10 @@ stdenv.mkDerivation rec {
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./disable-bad-message.patch
|
||||||
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
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 = "https://qgroundcontrol.com/";
|
homepage = "https://qgroundcontrol.com/";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue