2022-08-12 12:06:08 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv
|
2022-03-30 09:31:56 +00:00
|
|
|
, qtscript, qtserialport, qttools, qtcharts
|
2020-04-24 23:36:52 +00:00
|
|
|
, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
|
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "stellarium";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.22.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stellarium";
|
|
|
|
repo = "stellarium";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-FBH5IB1keMzRP06DQK2e7HX8rwm5/sdTX+cB80uG0vw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
freetype libpng libGLU libGL openssl libiconv qtscript qtserialport qttools
|
2022-03-30 09:31:56 +00:00
|
|
|
qtmultimedia qtlocation qtbase qtcharts
|
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
|
|
|
};
|
|
|
|
}
|