2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, perl
|
2022-11-21 17:40:18 +00:00
|
|
|
, wrapGAppsHook
|
2022-11-04 12:27:35 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
, qtbase
|
|
|
|
, qtcharts
|
2022-11-21 17:40:18 +00:00
|
|
|
, qtpositioning
|
2022-11-04 12:27:35 +00:00
|
|
|
, qtmultimedia
|
|
|
|
, qtserialport
|
2022-11-21 17:40:18 +00:00
|
|
|
, qttranslations
|
|
|
|
, qtwayland
|
2022-11-04 12:27:35 +00:00
|
|
|
, qtwebengine
|
|
|
|
, calcmysky
|
|
|
|
, qxlsx
|
|
|
|
, indilib
|
|
|
|
, libnova
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "stellarium";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stellarium";
|
|
|
|
repo = "stellarium";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-ellfBZWOkvlRauuwug96C7P/WjQ6dXiDnT0b3KH5zRM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
perl
|
2022-11-21 17:40:18 +00:00
|
|
|
wrapGAppsHook
|
2022-11-04 12:27:35 +00:00
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
qtbase
|
|
|
|
qtcharts
|
2022-11-21 17:40:18 +00:00
|
|
|
qtpositioning
|
2022-11-04 12:27:35 +00:00
|
|
|
qtmultimedia
|
|
|
|
qtserialport
|
2022-11-21 17:40:18 +00:00
|
|
|
qttranslations
|
|
|
|
qtwayland
|
2022-11-04 12:27:35 +00:00
|
|
|
qtwebengine
|
|
|
|
calcmysky
|
|
|
|
qxlsx
|
|
|
|
indilib
|
|
|
|
libnova
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
preConfigure = lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \
|
2022-08-12 12:06:08 +00:00
|
|
|
'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Applications/Stellarium.app/Contents")'
|
2020-10-07 09:15:18 +00:00
|
|
|
'';
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Free open-source planetarium";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://stellarium.org/";
|
|
|
|
license = licenses.gpl2Plus;
|
2020-10-07 09:15:18 +00:00
|
|
|
platforms = platforms.unix;
|
2021-10-17 02:12:59 +00:00
|
|
|
maintainers = with maintainers; [ ma27 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|