mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
|
--- kstars-3.5.0/CMakeLists.txt.old 2020-11-24 12:36:37.967433937 -0600
|
||
|
+++ kstars-3.5.0/CMakeLists.txt 2020-11-24 13:36:56.275263691 -0600
|
||
|
@@ -5,6 +5,9 @@
|
||
|
set (KSTARS_BUILD_RELEASE "Stable")
|
||
|
set (CMAKE_CXX_STANDARD 11)
|
||
|
|
||
|
+add_definitions(-DINDI_NIX_ROOT=${INDI_NIX_ROOT})
|
||
|
+add_definitions(-DXPLANET_NIX_ROOT=${XPLANET_NIX_ROOT})
|
||
|
+
|
||
|
# Build KStars Lite with -DBUILD_KSTARS_LITE=ON
|
||
|
option(BUILD_KSTARS_LITE "Build KStars Lite" OFF)
|
||
|
|
||
|
--- kstars-3.5.0/kstars/auxiliary/ksutils.old.cpp 2020-11-24 12:22:14.397319680 -0600
|
||
|
+++ kstars-3.5.0/kstars/auxiliary/ksutils.cpp 2020-11-24 13:32:22.946477798 -0600
|
||
|
@@ -1081,6 +1081,10 @@
|
||
|
// We support running within Snaps, Flatpaks, and AppImage
|
||
|
// The path should accomodate the differences between the different
|
||
|
// packaging solutions
|
||
|
+ #define STR_EXPAND(x) #x
|
||
|
+ #define STR(x) STR_EXPAND(x)
|
||
|
+ QString indi_prefix = QString(STR(INDI_NIX_ROOT));
|
||
|
+ QString xplanet_prefix = QString(STR(XPLANET_NIX_ROOT));
|
||
|
QString snap = QProcessEnvironment::systemEnvironment().value("SNAP");
|
||
|
QString flat = QProcessEnvironment::systemEnvironment().value("FLATPAK_DEST");
|
||
|
QString appimg = QProcessEnvironment::systemEnvironment().value("APPDIR");
|
||
|
@@ -1110,21 +1114,21 @@
|
||
|
#if defined(Q_OS_OSX)
|
||
|
return "/usr/local/bin/indiserver";
|
||
|
#endif
|
||
|
- return prefix + "/bin/indiserver";
|
||
|
+ return indi_prefix + "/bin/indiserver";
|
||
|
}
|
||
|
else if (option == "INDIHubAgent")
|
||
|
{
|
||
|
#if defined(Q_OS_OSX)
|
||
|
return "/usr/local/bin/indihub-agent";
|
||
|
#endif
|
||
|
- return prefix + "/bin/indihub-agent";
|
||
|
+ return indi_prefix + "/bin/indihub-agent";
|
||
|
}
|
||
|
else if (option == "indiDriversDir")
|
||
|
{
|
||
|
#if defined(Q_OS_OSX)
|
||
|
return "/usr/local/share/indi";
|
||
|
#elif defined(Q_OS_LINUX)
|
||
|
- return prefix + "/share/indi";
|
||
|
+ return indi_prefix + "/share/indi";
|
||
|
#else
|
||
|
return QStandardPaths::locate(QStandardPaths::GenericDataLocation, "indi", QStandardPaths::LocateDirectory);
|
||
|
#endif
|
||
|
@@ -1181,7 +1185,7 @@
|
||
|
#if defined(Q_OS_OSX)
|
||
|
return "/usr/local/bin/xplanet";
|
||
|
#endif
|
||
|
- return prefix + "/bin/xplanet";
|
||
|
+ return xplanet_prefix + "/bin/xplanet";
|
||
|
}
|
||
|
else if (option == "ASTAP")
|
||
|
{
|