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

39 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub
, cmake, freetype, libpng, libGLU, libGL, openssl, perl, libiconv
, qtscript, qtserialport, qttools, qtcharts
, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
}:
stdenv.mkDerivation rec {
pname = "stellarium";
version = "0.22.2";
src = fetchFromGitHub {
owner = "Stellarium";
repo = "stellarium";
rev = "v${version}";
sha256 = "sha256-FBH5IB1keMzRP06DQK2e7HX8rwm5/sdTX+cB80uG0vw=";
};
nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
buildInputs = [
freetype libpng libGLU libGL openssl libiconv qtscript qtserialport qttools
qtmultimedia qtlocation qtbase qtcharts
];
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"}/Applications/Stellarium.app/Contents")'
'';
meta = with lib; {
description = "Free open-source planetarium";
homepage = "https://stellarium.org/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ ma27 ];
};
}