depot/third_party/nixpkgs/pkgs/applications/science/astronomy/stellarium/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

38 lines
1.2 KiB
Nix

{ 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 ];
};
}