nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2020-09-27 21:56:41 +01:00
{ stdenv, lib, mkDerivation, fetchFromGitHub
2019-11-10 16:44:34 +00:00
, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv
2017-05-17 20:26:11 +01:00
, qtscript, qtserialport, qttools
, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
}:
2017-05-17 20:26:11 +01:00
mkDerivation rec {
pname = "stellarium";
version = "0.20.3";
2018-06-24 19:26:58 +01:00
src = fetchFromGitHub {
owner = "Stellarium";
repo = "stellarium";
rev = "v${version}";
sha256 = "08abrshrzhdfcg3b2vzfmnq8fhzrasadg1ajs81kcw96yjc59vak";
};
nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
buildInputs = [
2019-11-10 16:44:34 +00:00
freetype libpng libGLU libGL openssl libiconv qtscript qtserialport qttools
qtmultimedia qtlocation qtbase
];
2020-09-27 21:56:41 +01: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
'';
2017-05-17 20:26:11 +01:00
meta = with lib; {
2012-10-19 09:19:41 +01:00
description = "Free open-source planetarium";
homepage = "http://stellarium.org/";
2017-05-17 20:26:11 +01:00
license = licenses.gpl2;
2020-09-27 21:56:41 +01:00
platforms = platforms.unix;
maintainers = with maintainers; [ peti ma27 ];
};
}