2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, perl
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, qtbase
|
|
|
|
, qtcharts
|
|
|
|
, qtlocation
|
|
|
|
, qtmultimedia
|
|
|
|
, qtscript
|
|
|
|
, qtserialport
|
|
|
|
, 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-04 12:27:35 +00:00
|
|
|
version = "1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stellarium";
|
|
|
|
repo = "stellarium";
|
|
|
|
rev = "v${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
sha256 = "sha256-6EAykJ0yWeU1EBR5+7JjWGUVBE1DKW+W8yJOt0smkaE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
perl
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
qtbase
|
|
|
|
qtcharts
|
|
|
|
qtlocation
|
|
|
|
qtmultimedia
|
|
|
|
qtscript
|
|
|
|
qtserialport
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|