diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 3c7af809b884..945294c556f4 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -1,25 +1,32 @@ -{ mkDerivation, lib, fetchurl +{ mkDerivation, lib, fetchFromGitHub , cmake, freetype, libpng, libGLU_combined, gettext, openssl, perl, libiconv , qtscript, qtserialport, qttools -, qtmultimedia, qtlocation +, qtmultimedia, qtlocation, makeWrapper, qtbase }: mkDerivation rec { name = "stellarium-${version}"; - version = "0.16.1"; + version = "0.18.0"; - src = fetchurl { - url = "mirror://sourceforge/stellarium/${name}.tar.gz"; - sha256 = "087x6mbcn2yj8d3qi382vfkzgdwmanxzqi5l1x3iranxmx9c40dh"; + src = fetchFromGitHub { + owner = "Stellarium"; + repo = "stellarium"; + rev = "v${version}"; + sha256 = "11rh4gan8bhqb2n6a94g773drbq4ffii7aqjwxv97r036579azb2"; }; nativeBuildInputs = [ cmake perl ]; buildInputs = [ freetype libpng libGLU_combined openssl libiconv qtscript qtserialport qttools - qtmultimedia qtlocation + qtmultimedia qtlocation qtbase makeWrapper ]; + postInstall = '' + wrapProgram $out/bin/stellarium \ + --prefix QT_PLUGIN_PATH : "${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins" + ''; + meta = with lib; { description = "Free open-source planetarium"; homepage = http://stellarium.org/;