2020-10-07 09:15:18 +00:00
|
|
|
{ stdenv, lib, mkDerivation, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv
|
|
|
|
, qtscript, qtserialport, qttools
|
|
|
|
, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "stellarium";
|
2021-03-20 04:20:00 +00:00
|
|
|
version = "0.21.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stellarium";
|
|
|
|
repo = "stellarium";
|
|
|
|
rev = "v${version}";
|
2021-03-20 04:20:00 +00:00
|
|
|
sha256 = "sha256-LOBWfKLtoFemiWBUVayIBG0DORvjI6h9kgaPH9hGmKY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
freetype libpng libGLU libGL openssl libiconv qtscript qtserialport qttools
|
|
|
|
qtmultimedia qtlocation qtbase
|
|
|
|
];
|
|
|
|
|
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")' \
|
|
|
|
'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Stellarium.app/Contents")'
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
|
|
|
wrapQtApp "$out"/Stellarium.app/Contents/MacOS/stellarium
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Free open-source planetarium";
|
|
|
|
homepage = "http://stellarium.org/";
|
|
|
|
license = licenses.gpl2;
|
2020-10-07 09:15:18 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ peti ma27 ];
|
|
|
|
};
|
|
|
|
}
|