Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions pkgs/applications/science/astronomy/stellarium/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
perl,
wrapGAppsHook3,
Expand All @@ -24,34 +23,33 @@
testers,
xvfb-run,
gitUpdater,
md4c,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "stellarium";
version = "24.4";
version = "25.1";

src = fetchFromGitHub {
owner = "Stellarium";
repo = "stellarium";
rev = "v${finalAttrs.version}";
hash = "sha256-/xF9hXlPKhmpvpx9t1IgSqpvvqrGnd0xaf0QMvu+9IA=";
hash = "sha256-rbnGSdzPuFdSqWPaKtF3n4oLZ9l+4jX7KtnmcrTvwbs=";
};

patches = [
# Fix indi headers from https://github.com/Stellarium/stellarium/pull/4025
(fetchpatch {
url = "https://github.com/Stellarium/stellarium/commit/9669d64fb4104830412c6c6c2b45811075a92300.patch";
hash = "sha256-CXeghxxRIV7Filveg+3pNAWymUpUuGnylvt4e8THJ8A=";
})
];

postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \
'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Applications/Stellarium.app/Contents")'
substituteInPlace src/CMakeLists.txt \
--replace "\''${_qt_bin_dir}/../" "${qtmultimedia}/lib/qt-6/"
'';
postPatch =
''
substituteInPlace CMakeLists.txt \
--replace-fail 'CPMAddPackage(NAME md4c' \
'CPMFindPackage(NAME md4c'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace-fail 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \
'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Applications/Stellarium.app/Contents")'
substituteInPlace src/CMakeLists.txt \
--replace-fail "\''${_qt_bin_dir}/../" "${qtmultimedia}/lib/qt-6/"
'';

nativeBuildInputs = [
cmake
Expand All @@ -74,6 +72,7 @@ stdenv.mkDerivation (finalAttrs: {
indilib
libnova
exiv2
md4c
nlopt
]
++ lib.optionals stdenv.hostPlatform.isLinux [
Expand Down