diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
commit | 80d90d9b204f7c17912740f9f414fe5d59f293ba (patch) | |
tree | 5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/applications/science/astronomy/kstars/indi-fix.patch | |
parent | 3a31a84c7d3e589035ad08499206aac44a81f424 (diff) | |
parent | 83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff) |
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/science/astronomy/kstars/indi-fix.patch')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/applications/science/astronomy/kstars/indi-fix.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/science/astronomy/kstars/indi-fix.patch b/infra/libkookie/nixpkgs/pkgs/applications/science/astronomy/kstars/indi-fix.patch new file mode 100644 index 000000000000..9ff9f8a31dd3 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/science/astronomy/kstars/indi-fix.patch @@ -0,0 +1,50 @@ +--- CMakeLists.txt 2020-11-02 13:58:06.119743710 -0600 ++++ kstars-3.4.3/CMakeLists.txt 2020-11-02 14:05:01.707799274 -0600 +@@ -4,5 +4,7 @@ + set (KStars_VERSION_REVISION 3) + set (CMAKE_CXX_STANDARD 11) + ++add_definitions(-DINDI_NIX_ROOT=${INDI_NIX_ROOT}) ++ + # Build KStars Lite with -DBUILD_KSTARS_LITE=ON + option(BUILD_KSTARS_LITE "Build KStars Lite" OFF) + +--- ksutils.cpp 2020-11-02 13:47:44.883596916 -0600 ++++ kstars-3.4.3/kstars/auxiliary/ksutils.cpp 2020-11-02 17:41:44.961937090 -0600 +@@ -1076,6 +1076,9 @@ + { + QString snap = QProcessEnvironment::systemEnvironment().value("SNAP"); + QString flat = QProcessEnvironment::systemEnvironment().value("FLATPAK_DEST"); ++#define STR_EXPAND(x) #x ++#define STR(x) STR_EXPAND(x) ++ QString nix = QString(STR(INDI_NIX_ROOT)); + + if (option == "fitsDir") + { +@@ -1089,7 +1091,7 @@ + if (flat.isEmpty() == false) + return flat + "/bin/indiserver"; + else +- return snap + "/usr/bin/indiserver"; ++ return nix + "/bin/indiserver"; + } + else if (option == "INDIHubAgent") + { +@@ -1099,7 +1101,7 @@ + if (flat.isEmpty() == false) + return flat + "/bin/indihub-agent"; + else +- return snap + "/usr/bin/indihub-agent"; ++ return nix + "/bin/indihub-agent"; + } + else if (option == "indiDriversDir") + { +@@ -1109,7 +1111,7 @@ + if (flat.isEmpty() == false) + return flat + "/share/indi"; + else +- return snap + "/usr/share/indi"; ++ return nix + "/share/indi"; + #else + return QStandardPaths::locate(QStandardPaths::GenericDataLocation, "indi", QStandardPaths::LocateDirectory); + #endif |