Subject: [bug#58481] [PATCH 9/9] gnu: stellarium: Update to 1.0.

From: Cairn <[email-masked]>
Date: Thu, 13 Oct 2022 05:43:12 +0000

* gnu/packages/astronomy.scm (stellarium): Update to 1.0.
---
 gnu/packages/astronomy.scm | 80 +++++++++++++++++++++++---------------
 1 file changed, 49 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 72e923e895..5798d8004f 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -43,6 +43,8 @@ (define-module (gnu packages astronomy)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gps)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libusb)
@@ -66,6 +68,7 @@ (define-module (gnu packages astronomy)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -74,6 +77,7 @@ (define-module (gnu packages astronomy)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
+  #:use-module (guix build utils)
   #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
@@ -759,42 +763,56 @@ (define-public calcmysky
 (define-public stellarium
   (package
     (name "stellarium")
-    (version "0.21.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/Stellarium/stellarium"
-                           "/releases/download/v" version
-                           "/stellarium-" version ".tar.gz"))
-       (sha256
-        (base32 "049jlc8vx06pad5h2syrmf7f1l346yr5iraai0wkn8s8pk30j8q7"))))
+    (version "1.0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/Stellarium/stellarium"
+                                 "/releases/download/v" version
+                                 "/stellarium-" version ".tar.gz"))
+             (sha256
+              (base32 "0gzksnskk0a105dji5j7hjizmyc7bs9riz6650hv417bq70i46as"))))
     (build-system cmake-build-system)
     (inputs
-     (list qtbase-5
-           qtlocation
-           qtmultimedia-5
-           qtscript
-           qtserialport-5
+     (list qtbase
+           qtmultimedia
+           qtpositioning
+           qttools
+           qtimageformats
+           qtwebengine
+           qtwebchannel
+           qtcharts
+           qtserialport
+           qtdeclarative
+           libxkbcommon
+           calcmysky
+           qxlsx
+           indi
+           libnova
+           gpsd
            zlib))
     (native-inputs
-     `(("gettext" ,gettext-minimal)     ; xgettext is used at compile time
-       ("perl" ,perl)                   ; for pod2man
-       ("qtbase" ,qtbase-5)               ; Qt MOC is needed at compile time
-       ("qttools-5" ,qttools-5)))
+     (list gettext-minimal ; xgettext is used at compile time
+           perl            ; for pod2man
+           qtbase          ; Qt MOC is needed at compile time
+           graphviz
+           doxygen
+           qttools))
     (arguments
-     `(#:test-target "test"
-       #:configure-flags (list "-DENABLE_TESTING=1"
-                               (string-append
-                                "-DCMAKE_CXX_FLAGS=-isystem "
-                                (assoc-ref %build-inputs "qtserialport-5")
-                                "/include/qt5"))
-       #:phases (modify-phases %standard-phases
-                  (add-before 'check 'set-offscreen-display
-                    (lambda _
-                      ;; Make Qt render "offscreen", required for tests.
-                      (setenv "QT_QPA_PLATFORM" "offscreen")
-                      (setenv "HOME" "/tmp")
-                      #t)))))
+     (list #:test-target "test"
+           #:configure-flags
+           #~(list "-DENABLE_TESTING=1"
+                   "-DENABLE_QT6=1"
+                   (string-append
+                    "-DCMAKE_CXX_FLAGS=-isystem "
+                    #$(this-package-input "qtserialport")
+                    "/include/qt6"))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'check 'set-offscreen-display
+                 (lambda _
+                   ;; Make Qt render "offscreen", required for tests.
+                   (setenv "QT_QPA_PLATFORM" "offscreen")
+                   (setenv "HOME" "/tmp"))))))
     (home-page "https://stellarium.org/")
     (synopsis "3D sky viewer")
     (description "Stellarium is a planetarium.  It shows a realistic sky in
-- 

2.38.0