phd2: fix build, use system libraries (#450835)

This commit is contained in:
Leona Maroni
2025-10-11 16:50:36 +00:00
committed by GitHub
+31 -8
View File
@@ -2,16 +2,21 @@
lib,
stdenv,
fetchFromGitHub,
pkg-config,
fetchpatch2,
cmake,
gtk3,
wxGTK32,
ninja,
pkg-config,
wrapGAppsHook3,
cfitsio,
curl,
eigen_3_4_0,
gettext,
glib,
indi-full,
gtest,
gtk3,
libnova,
wrapGAppsHook3,
libusb1,
wxGTK32,
}:
stdenv.mkDerivation rec {
@@ -25,24 +30,42 @@ stdenv.mkDerivation rec {
sha256 = "sha256-GnT/tyk975caqESBSu4mdX5IWGi5O+RljLSd+CwoGWo=";
};
# fixes build error because of missing include
# is in masster, should be removed with next release
patches = [
(fetchpatch2 {
url = "https://github.com/OpenPHDGuiding/phd2/commit/0927de6c8943fae7161457008b989bf72a05c638.patch?full_index=1";
hash = "sha256-yo5YdZ4B7jx6p4TqFZc7RJsutsWzeNBUfinFAd8es7E=";
})
];
nativeBuildInputs = [
cmake
ninja
pkg-config
wrapGAppsHook3
];
buildInputs = [
gtk3
wxGTK32
cfitsio
curl
eigen_3_4_0
gettext
glib
indi-full
gtest
gtk3
libnova
libusb1
wxGTK32
];
cmakeFlags = [
"-DCMAKE_CXX_STANDARD=17" # needed for gtest
"-DOPENSOURCE_ONLY=1"
"-DUSE_SYSTEM_CFITSIO=ON"
"-DUSE_SYSTEM_LIBUSB=ON"
"-DUSE_SYSTEM_EIGEN3=ON"
"-DUSE_SYSTEM_GTEST=ON"
];
# Fix broken wrapped name scheme by moving wrapped binary to where wrapper expects it