GNU bug report logs - #61674
[PATCH 0/4] gnu: stellarium: Enable ShowMySky.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Tue, 21 Feb 2023 13:07:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61674 in the body.
You can then email your comments to 61674 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 21 Feb 2023 13:07:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 21 Feb 2023 13:07:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Tue, 21 Feb 2023 13:06:00 +0000
Hi Guix,

This patch series adds support of CalcMyScky/ShowMySky module for
Stellarium that simulates scattering of light by the atmosphere.

It also include both Qt6 and Qt5 - qxlsx and calcmysky to be
compatible with Stellarium build which is packed using Qt5 inputs.

Sharlatan Hellseher (4):
  gnu: Add calcmysky.
  gnu: qxlsx: Use Qt6.
  gnu: Add qxlsx-qt5.
  gnu: stellarium: Enable ShowMySky.

 gnu/packages/astronomy.scm | 64 +++++++++++++++++++++++++++++++++++---
 gnu/packages/qt.scm        | 10 +++++-
 2 files changed, 69 insertions(+), 5 deletions(-)


base-commit: c81d2d448cbd051800867fe3f4b82ef3f4380ebf
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 21 Feb 2023 13:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/4] gnu: Add calcmysky.
Date: Tue, 21 Feb 2023 13:07:20 +0000
* gnu/packages/astronomy.scm (calcmysky, calcmysky-qt5): New variables.
---
 gnu/packages/astronomy.scm | 57 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 5cee981671..f13f74a5e8 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -26,6 +26,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages astronomy)
+  #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
@@ -209,6 +210,62 @@ (define-public calceph
 @end itemize\n")
     (license license:cecill)))
 
+(define-public calcmysky
+  (package
+    (name "calcmysky")
+    (version "0.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/10110111/CalcMySky")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bib5shy8wzc7j5ph218dl9hqrqip491mn25gakyghbvaqxgm27d"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "-DQT_VERSION=6")))
+    (inputs
+     (list eigen glm qtbase))
+    (home-page "https://10110111.github.io/CalcMySky/")
+    (synopsis "Simulator of light scattering by planetary atmospheres")
+    (description
+     "CalcMySky is a software package that simulates scattering of light by the
+atmosphere to render daytime and twilight skies (without stars).  Its primary
+purpose is to enable realistic view of the sky in applications such as
+planetaria.  Secondary objective is to make it possible to explore atmospheric
+effects such as glories, fogbows etc., as well as simulate unusual environments
+such as on Mars or an exoplanet orbiting a star with a non-solar spectrum of
+radiation.
+
+This package consists of three parts:
+
+@itemize
+@item @code{calcmysky} utility that does the precomputation of the atmosphere
+model to enable rendering.
+
+@item @code{libShowMySky} library that lets the applications render the
+atmosphere model.
+
+@item @code{ShowMySky} preview GUI that makes it possible to preview the
+rendering of the atmosphere model and examine its properties.
+@end itemize")
+    (license license:gpl3)))
+
+(define-public calcmysky-qt5
+  (package
+    (inherit calcmysky)
+    (name "calcmysky-qt5")
+    (arguments
+     (list #:configure-flags
+           #~(list "-DQT_VERSION=5")))
+    (inputs
+     (alist-replace "qtbase" (list qtbase-5)
+                    (package-inputs calcmysky)))
+    (synopsis "Qt5 build for the CalcMySky library.")))
+
 (define-public aoflagger
   (package
     (name "aoflagger")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 21 Feb 2023 13:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 2/4] gnu: qxlsx: Use Qt6.
Date: Tue, 21 Feb 2023 13:07:21 +0000
* gnu/packages/qt.scm (qxlsx):
  [inputs]: Use QTBASE (Qt6) instead QTBASE-5. Add LIBXKBCOMMON,
  VULKAN-HEADERS.
---
 gnu/packages/qt.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 76e9e519c7..4985a79db4 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1148,7 +1148,7 @@ (define-public qxlsx
                   (invoke "make" "-j" (number->string (parallel-job-count)))
                   (invoke "./TestExcel"))))))))
      (inputs
-      (list qtbase-5))
+      (list libxkbcommon qtbase vulkan-headers))
      (home-page "https://qtexcel.github.io/QXlsx/")
      (synopsis "C++ library to read/write Excel XLSX files using Qt")
      (description
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 21 Feb 2023 13:08:03 GMT) Full text and rfc822 format available.

Message #14 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 3/4] gnu: Add qxlsx-qt5.
Date: Tue, 21 Feb 2023 13:07:22 +0000
* gnu/packages/qt.scm (qxlsx-qt5): New variable.
---
 gnu/packages/qt.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4985a79db4..b2e14e5757 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1156,6 +1156,14 @@ (define-public qxlsx
 XLSX document format.")
      (license license:expat)))
 
+(define-public qxlsx-qt5
+  (package
+    (inherit qxlsx)
+    (name "qxlsx-qt5")
+    (inputs
+     (list qtbase-5))
+    (synopsis "Qt5 build for the qxlsx library.")))
+
 (define-public qtxmlpatterns
   (package (inherit qtsvg-5)
     (name "qtxmlpatterns")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 21 Feb 2023 13:08:03 GMT) Full text and rfc822 format available.

Message #17 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 4/4] gnu: stellarium: Enable ShowMySky.
Date: Tue, 21 Feb 2023 13:07:23 +0000
* gnu/packages/astronomy.scm (stellarium):
  [arguments]<#:configure-flags>: Enable ShowMySky optional dependencies
  to simulate scattering of light by the atmosphere.
  [inputs]: Replace QXLSX to QXLSX-QT5. Add CALCMYSKY-QT5.
---
 gnu/packages/astronomy.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index f13f74a5e8..e15df2874a 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -917,8 +917,6 @@ (define-public stellarium
       #~(list "-DENABLE_GPS=1"
               ;; TODO: Enable when all of the dependencies are availalbe for Qt6.
               "-DENABLE_QT6=0"
-              ;; TODO: Pack missing in Guix https://10110111.github.io/CalcMySky/
-              "-DENABLE_SHOWMYSKY=0"
               "-DENABLE_TESTING=0"
               (string-append "-DCMAKE_CXX_FLAGS=-isystem "
                              #$(this-package-input "qtserialport") "/include/qt5"))
@@ -929,7 +927,8 @@ (define-public stellarium
               (setenv "QT_QPA_PLATFORM" "offscreen")
               (setenv "HOME" "/tmp"))))))
     (inputs
-     (list gpsd
+     (list calcmysky-qt5
+           gpsd
            indi
            libnova
            openssl
@@ -942,7 +941,7 @@ (define-public stellarium
            qtserialport
            qttranslations
            qtwebengine-5
-           qxlsx
+           qxlsx-qt5
            zlib))
     (native-inputs
      (list doxygen
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sun, 26 Feb 2023 00:38:02 GMT) Full text and rfc822 format available.

Message #20 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Date: Sun, 26 Feb 2023 00:37:42 +0000
Hi Guix!

I've found the fix for aarch64-linux, thanks to the author's replay -
https://github.com/10110111/CalcMySky/issues/12
v2 should pass the QA now :)

Thanks.

-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sun, 26 Feb 2023 00:45:02 GMT) Full text and rfc822 format available.

Message #23 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/4] gnu: Add calcmysky.
Date: Sun, 26 Feb 2023 00:44:03 +0000
* gnu/packages/astronomy.scm (calcmysky, calcmysky-qt5): New variables.
---
 gnu/packages/astronomy.scm | 59 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 5cee981671..0f3176bc3e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -26,6 +26,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages astronomy)
+  #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
@@ -209,6 +210,64 @@ (define-public calceph
 @end itemize\n")
     (license license:cecill)))
 
+(define-public calcmysky
+  (package
+    (name "calcmysky")
+    (version "0.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/10110111/CalcMySky")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bib5shy8wzc7j5ph218dl9hqrqip491mn25gakyghbvaqxgm27d"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "-DQT_VERSION=6"
+                   "-DCMAKE_CXX_FLAGS=-fPIC")))
+    (inputs
+     (list eigen glm qtbase))
+    (home-page "https://10110111.github.io/CalcMySky/")
+    (synopsis "Simulator of light scattering by planetary atmospheres")
+    (description
+     "CalcMySky is a software package that simulates scattering of light by the
+atmosphere to render daytime and twilight skies (without stars).  Its primary
+purpose is to enable realistic view of the sky in applications such as
+planetaria.  Secondary objective is to make it possible to explore atmospheric
+effects such as glories, fogbows etc., as well as simulate unusual environments
+such as on Mars or an exoplanet orbiting a star with a non-solar spectrum of
+radiation.
+
+This package consists of three parts:
+
+@itemize
+@item @code{calcmysky} utility that does the precomputation of the atmosphere
+model to enable rendering.
+
+@item @code{libShowMySky} library that lets the applications render the
+atmosphere model.
+
+@item @code{ShowMySky} preview GUI that makes it possible to preview the
+rendering of the atmosphere model and examine its properties.
+@end itemize")
+    (license license:gpl3)))
+
+(define-public calcmysky-qt5
+  (package
+    (inherit calcmysky)
+    (name "calcmysky-qt5")
+    (arguments
+     (list #:configure-flags
+           #~(list "-DQT_VERSION=5"
+                   "-DCMAKE_CXX_FLAGS=-fPIC")))
+    (inputs
+     (alist-replace "qtbase" (list qtbase-5)
+                    (package-inputs calcmysky)))
+    (synopsis "Qt5 build for the CalcMySky library.")))
+
 (define-public aoflagger
   (package
     (name "aoflagger")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sun, 26 Feb 2023 00:45:02 GMT) Full text and rfc822 format available.

Message #26 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 3/4] gnu: Add qxlsx-qt5.
Date: Sun, 26 Feb 2023 00:44:05 +0000
* gnu/packages/qt.scm (qxlsx-qt5): New variable.
---
 gnu/packages/qt.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4985a79db4..b2e14e5757 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1156,6 +1156,14 @@ (define-public qxlsx
 XLSX document format.")
      (license license:expat)))
 
+(define-public qxlsx-qt5
+  (package
+    (inherit qxlsx)
+    (name "qxlsx-qt5")
+    (inputs
+     (list qtbase-5))
+    (synopsis "Qt5 build for the qxlsx library.")))
+
 (define-public qtxmlpatterns
   (package (inherit qtsvg-5)
     (name "qtxmlpatterns")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sun, 26 Feb 2023 00:45:03 GMT) Full text and rfc822 format available.

Message #29 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 4/4] gnu: stellarium: Enable ShowMySky.
Date: Sun, 26 Feb 2023 00:44:06 +0000
* gnu/packages/astronomy.scm (stellarium):
  [arguments]<#:configure-flags>: Enable ShowMySky optional dependencies
  to simulate scattering of light by the atmosphere.
  [inputs]: Replace QXLSX to QXLSX-QT5. Add CALCMYSKY-QT5.
---
 gnu/packages/astronomy.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 0f3176bc3e..ffce19e8fc 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -919,8 +919,6 @@ (define-public stellarium
       #~(list "-DENABLE_GPS=1"
               ;; TODO: Enable when all of the dependencies are availalbe for Qt6.
               "-DENABLE_QT6=0"
-              ;; TODO: Pack missing in Guix https://10110111.github.io/CalcMySky/
-              "-DENABLE_SHOWMYSKY=0"
               "-DENABLE_TESTING=0"
               (string-append "-DCMAKE_CXX_FLAGS=-isystem "
                              #$(this-package-input "qtserialport") "/include/qt5"))
@@ -931,7 +929,8 @@ (define-public stellarium
               (setenv "QT_QPA_PLATFORM" "offscreen")
               (setenv "HOME" "/tmp"))))))
     (inputs
-     (list gpsd
+     (list calcmysky-qt5
+           gpsd
            indi
            libnova
            openssl
@@ -944,7 +943,7 @@ (define-public stellarium
            qtserialport
            qttranslations
            qtwebengine-5
-           qxlsx
+           qxlsx-qt5
            zlib))
     (native-inputs
      (list doxygen
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sun, 26 Feb 2023 00:45:03 GMT) Full text and rfc822 format available.

Message #32 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 2/4] gnu: qxlsx: Use Qt6.
Date: Sun, 26 Feb 2023 00:44:04 +0000
* gnu/packages/qt.scm (qxlsx):
  [inputs]: Use QTBASE (Qt6) instead QTBASE-5. Add LIBXKBCOMMON,
  VULKAN-HEADERS.
---
 gnu/packages/qt.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 76e9e519c7..4985a79db4 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1148,7 +1148,7 @@ (define-public qxlsx
                   (invoke "make" "-j" (number->string (parallel-job-count)))
                   (invoke "./TestExcel"))))))))
      (inputs
-      (list qtbase-5))
+      (list libxkbcommon qtbase vulkan-headers))
      (home-page "https://qtexcel.github.io/QXlsx/")
      (synopsis "C++ library to read/write Excel XLSX files using Qt")
      (description
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sun, 26 Feb 2023 02:56:02 GMT) Full text and rfc822 format available.

Message #35 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 61674 <at> debbugs.gnu.org
Subject: Re: [bug#61674] [PATCH 1/4] gnu: Add calcmysky.
Date: Sat, 25 Feb 2023 21:55:27 -0500
On Sun, Feb 26, 2023 at 12:44:03AM +0000, Sharlatan Hellseher wrote:
> * gnu/packages/astronomy.scm (calcmysky, calcmysky-qt5): New variables.

Thanks for these patches!

> +  #:use-module ((guix build utils) #:select (alist-replace))
[...]
> +(define-public calcmysky-qt5
> +  (package
> +    (inherit calcmysky)
> +    (name "calcmysky-qt5")
> +    (arguments
> +     (list #:configure-flags
> +           #~(list "-DQT_VERSION=5"
> +                   "-DCMAKE_CXX_FLAGS=-fPIC")))
> +    (inputs
> +     (alist-replace "qtbase" (list qtbase-5)
> +                    (package-inputs calcmysky)))

Can you try rewriting this using modify-inputs, rather than
alist-replace?

https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html#Defining-Package-Variants

Feel free to ask for help if you get stuck.




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Mon, 27 Feb 2023 21:15:02 GMT) Full text and rfc822 format available.

Message #38 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 61674 <at> debbugs.gnu.org
Subject: Re: bug#61674: [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Mon, 27 Feb 2023 22:14:30 +0100
Hi!

Thanks for a nice patch series!

Sharlatan Hellseher <sharlatanus <at> gmail.com> skribis:

> * gnu/packages/astronomy.scm (calcmysky, calcmysky-qt5): New variables.

[...]

> +    (license license:gpl3)))

Please double-check whether something explicitly says “version 3 only”;
if not, it’s ‘gpl3+’.

> +(define-public calcmysky-qt5
> +  (package
> +    (inherit calcmysky)

Rather:

  (package/inherit calcmysky
    (name "calcmysky-qt5")
    …)

> +    (inputs
> +     (alist-replace "qtbase" (list qtbase-5)
> +                    (package-inputs calcmysky)))

Instead of ‘alist-replace’, write

  (modify-inputs (package-inputs calcmysky)
    (replace "qtbase" qtbase-5))

You can remove the corresponding #:use-module form at the top.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Mon, 27 Feb 2023 21:16:01 GMT) Full text and rfc822 format available.

Message #41 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 61674 <at> debbugs.gnu.org
Subject: Re: bug#61674: [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Mon, 27 Feb 2023 22:15:01 +0100
Sharlatan Hellseher <sharlatanus <at> gmail.com> skribis:

> * gnu/packages/qt.scm (qxlsx-qt5): New variable.
> ---
>  gnu/packages/qt.scm | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index 4985a79db4..b2e14e5757 100644
> --- a/gnu/packages/qt.scm
> +++ b/gnu/packages/qt.scm
> @@ -1156,6 +1156,14 @@ (define-public qxlsx
>  XLSX document format.")
>       (license license:expat)))
>  
> +(define-public qxlsx-qt5
> +  (package
> +    (inherit qxlsx)

Please use ‘package/inherit’ as well.




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Mon, 27 Feb 2023 21:17:02 GMT) Full text and rfc822 format available.

Message #44 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 61674 <at> debbugs.gnu.org
Subject: Re: bug#61674: [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Mon, 27 Feb 2023 22:15:55 +0100
Sharlatan Hellseher <sharlatanus <at> gmail.com> skribis:

> * gnu/packages/astronomy.scm (stellarium):
>   [arguments]<#:configure-flags>: Enable ShowMySky optional dependencies
>   to simulate scattering of light by the atmosphere.
>   [inputs]: Replace QXLSX to QXLSX-QT5. Add CALCMYSKY-QT5.

LGTM!

Could you send an updated revision of this patch series taking into
account previous comments?  Then we should be all set!

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 28 Feb 2023 00:13:02 GMT) Full text and rfc822 format available.

Message #47 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v3 1/4] gnu: Add calcmysky.
Date: Tue, 28 Feb 2023 00:12:27 +0000
* gnu/packages/astronomy.scm (calcmysky, calcmysky-qt5): New variables.
---
 gnu/packages/astronomy.scm | 57 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 5cee981671..bf022c1804 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -209,6 +209,63 @@ (define-public calceph
 @end itemize\n")
     (license license:cecill)))
 
+(define-public calcmysky
+  (package
+    (name "calcmysky")
+    (version "0.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/10110111/CalcMySky")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bib5shy8wzc7j5ph218dl9hqrqip491mn25gakyghbvaqxgm27d"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "-DQT_VERSION=6"
+                   "-DCMAKE_CXX_FLAGS=-fPIC")))
+    (inputs
+     (list eigen glm qtbase))
+    (home-page "https://10110111.github.io/CalcMySky/")
+    (synopsis "Simulator of light scattering by planetary atmospheres")
+    (description
+     "CalcMySky is a software package that simulates scattering of light by the
+atmosphere to render daytime and twilight skies (without stars).  Its primary
+purpose is to enable realistic view of the sky in applications such as
+planetaria.  Secondary objective is to make it possible to explore atmospheric
+effects such as glories, fogbows etc., as well as simulate unusual environments
+such as on Mars or an exoplanet orbiting a star with a non-solar spectrum of
+radiation.
+
+This package consists of three parts:
+
+@itemize
+@item @code{calcmysky} utility that does the precomputation of the atmosphere
+model to enable rendering.
+
+@item @code{libShowMySky} library that lets the applications render the
+atmosphere model.
+
+@item @code{ShowMySky} preview GUI that makes it possible to preview the
+rendering of the atmosphere model and examine its properties.
+@end itemize")
+    (license license:gpl3+)))
+
+(define-public calcmysky-qt5
+  (package/inherit calcmysky
+    (name "calcmysky-qt5")
+    (arguments
+     (list #:configure-flags
+           #~(list "-DQT_VERSION=5"
+                   "-DCMAKE_CXX_FLAGS=-fPIC")))
+    (inputs
+     (modify-inputs (package-inputs calcmysky)
+       (replace "qtbase" qtbase-5)))
+    (synopsis "Qt5 build for the CalcMySky library.")))
+
 (define-public aoflagger
   (package
     (name "aoflagger")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 28 Feb 2023 00:13:03 GMT) Full text and rfc822 format available.

Message #50 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v3 2/4] gnu: qxlsx: Use Qt6.
Date: Tue, 28 Feb 2023 00:12:28 +0000
* gnu/packages/qt.scm (qxlsx):
  [inputs]: Use QTBASE (Qt6) instead QTBASE-5. Add LIBXKBCOMMON,
  VULKAN-HEADERS.
---
 gnu/packages/qt.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 76e9e519c7..4985a79db4 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1148,7 +1148,7 @@ (define-public qxlsx
                   (invoke "make" "-j" (number->string (parallel-job-count)))
                   (invoke "./TestExcel"))))))))
      (inputs
-      (list qtbase-5))
+      (list libxkbcommon qtbase vulkan-headers))
      (home-page "https://qtexcel.github.io/QXlsx/")
      (synopsis "C++ library to read/write Excel XLSX files using Qt")
      (description
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 28 Feb 2023 00:13:03 GMT) Full text and rfc822 format available.

Message #53 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v3 3/4] gnu: Add qxlsx-qt5.
Date: Tue, 28 Feb 2023 00:12:29 +0000
* gnu/packages/qt.scm (qxlsx-qt5): New variable.
---
 gnu/packages/qt.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4985a79db4..643744ee7a 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1156,6 +1156,13 @@ (define-public qxlsx
 XLSX document format.")
      (license license:expat)))
 
+(define-public qxlsx-qt5
+  (package/inherit qxlsx
+    (name "qxlsx-qt5")
+    (inputs
+     (list qtbase-5))
+    (synopsis "Qt5 build for the qxlsx library.")))
+
 (define-public qtxmlpatterns
   (package (inherit qtsvg-5)
     (name "qtxmlpatterns")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 28 Feb 2023 00:13:04 GMT) Full text and rfc822 format available.

Message #56 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 61674 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v3 4/4] gnu: stellarium: Enable ShowMySky.
Date: Tue, 28 Feb 2023 00:12:30 +0000
* gnu/packages/astronomy.scm (stellarium):
  [arguments]<#:configure-flags>: Enable ShowMySky optional dependencies
  to simulate scattering of light by the atmosphere.
  [inputs]: Replace QXLSX to QXLSX-QT5. Add CALCMYSKY-QT5.
---
 gnu/packages/astronomy.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index bf022c1804..473e7ce63a 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -917,8 +917,6 @@ (define-public stellarium
       #~(list "-DENABLE_GPS=1"
               ;; TODO: Enable when all of the dependencies are availalbe for Qt6.
               "-DENABLE_QT6=0"
-              ;; TODO: Pack missing in Guix https://10110111.github.io/CalcMySky/
-              "-DENABLE_SHOWMYSKY=0"
               "-DENABLE_TESTING=0"
               (string-append "-DCMAKE_CXX_FLAGS=-isystem "
                              #$(this-package-input "qtserialport") "/include/qt5"))
@@ -929,7 +927,8 @@ (define-public stellarium
               (setenv "QT_QPA_PLATFORM" "offscreen")
               (setenv "HOME" "/tmp"))))))
     (inputs
-     (list gpsd
+     (list calcmysky-qt5
+           gpsd
            indi
            libnova
            openssl
@@ -942,7 +941,7 @@ (define-public stellarium
            qtserialport
            qttranslations
            qtwebengine-5
-           qxlsx
+           qxlsx-qt5
            zlib))
     (native-inputs
      (list doxygen
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Tue, 28 Feb 2023 10:37:02 GMT) Full text and rfc822 format available.

Message #59 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>, Sharlatan Hellseher
 <sharlatanus <at> gmail.com>
Cc: 61674 <at> debbugs.gnu.org
Subject: Re: [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Tue, 28 Feb 2023 11:35:25 +0100
Hi Ludo,

On lun., 27 févr. 2023 at 22:14, Ludovic Courtès <ludo <at> gnu.org> wrote:

>> +(define-public calcmysky-qt5
>> +  (package
>> +    (inherit calcmysky)
>
> Rather:
>
>   (package/inherit calcmysky
>     (name "calcmysky-qt5")
>     …)

Out of curiosity, what is the rationale for this suggestion?

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Fri, 03 Mar 2023 10:50:02 GMT) Full text and rfc822 format available.

Message #62 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 61674 <at> debbugs.gnu.org
Subject: Re: [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Fri, 03 Mar 2023 11:49:45 +0100
Hi,

Simon Tournier <zimon.toutoune <at> gmail.com> skribis:

> On lun., 27 févr. 2023 at 22:14, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>>> +(define-public calcmysky-qt5
>>> +  (package
>>> +    (inherit calcmysky)
>>
>> Rather:
>>
>>   (package/inherit calcmysky
>>     (name "calcmysky-qt5")
>>     …)
>
> Out of curiosity, what is the rationale for this suggestion?

This is so that the ‘replacement’ field of ‘calcmysky’, when there is
one, inherits the same transformations in ‘calcmysky-qt5’.  Quoth the
‘package/inherit’ docstring:

  Like (package (inherit P) OVERRIDES ...), except that the same
  transformation is done to the package P's replacement, if any.  P must
  be a bare identifier, and will be bound to either P or its replacement
  when evaluating OVERRIDES.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Fri, 03 Mar 2023 11:06:02 GMT) Full text and rfc822 format available.

Message #65 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 61674 <at> debbugs.gnu.org
Subject: Re: [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Fri, 3 Mar 2023 12:04:54 +0100
Hi,

On Fri, 3 Mar 2023 at 11:49, Ludovic Courtès <ludo <at> gnu.org> wrote:

> This is so that the ‘replacement’ field of ‘calcmysky’, when there is
> one, inherits the same transformations in ‘calcmysky-qt5’.  Quoth the
> ‘package/inherit’ docstring:
>
>   Like (package (inherit P) OVERRIDES ...), except that the same
>   transformation is done to the package P's replacement, if any.  P must
>   be a bare identifier, and will be bound to either P or its replacement
>   when evaluating OVERRIDES.

Thanks for the explanations but it is still unclear.  Sorry to be slow.

It is not clear for me why you choose one over the other.  From my
current understanding, I would be tempted to always use
'package/inherit' and never plain 'inherit'.

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Fri, 03 Mar 2023 15:55:02 GMT) Full text and rfc822 format available.

Message #68 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Sharlatan Hellseher <sharlatanus <at> gmail.com>, 61674 <at> debbugs.gnu.org
Subject: Re: [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Fri, 03 Mar 2023 10:54:11 -0500
Hi Simon,

Simon Tournier <zimon.toutoune <at> gmail.com> writes:

> Hi,
>
> On Fri, 3 Mar 2023 at 11:49, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>> This is so that the ‘replacement’ field of ‘calcmysky’, when there is
>> one, inherits the same transformations in ‘calcmysky-qt5’.  Quoth the
>> ‘package/inherit’ docstring:
>>
>>   Like (package (inherit P) OVERRIDES ...), except that the same
>>   transformation is done to the package P's replacement, if any.  P must
>>   be a bare identifier, and will be bound to either P or its replacement
>>   when evaluating OVERRIDES.
>
> Thanks for the explanations but it is still unclear.  Sorry to be slow.
>
> It is not clear for me why you choose one over the other.  From my
> current understanding, I would be tempted to always use
> 'package/inherit' and never plain 'inherit'.

I also got confused by that in the past;  The way I process it
internally now is this:

If the inheritance is for *same-source/same-version* variants of a
package, they should use package/inherit, as any security issues found
in the parent package should also be applied to that package (since they
use the same source).  Otherwise, plain 'inherit' should be used
(e.g. for newer version variants).

I hope that helps!

Yours in slowness,

-- 
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Fri, 03 Mar 2023 18:20:02 GMT) Full text and rfc822 format available.

Message #71 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Sharlatan Hellseher <sharlatanus <at> gmail.com>, 61674 <at> debbugs.gnu.org
Subject: Re: [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Fri, 3 Mar 2023 19:19:34 +0100
Hi Maxim,

On Fri, 3 Mar 2023 at 16:54, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:

> If the inheritance is for *same-source/same-version* variants of a
> package, they should use package/inherit, as any security issues found
> in the parent package should also be applied to that package (since they
> use the same source).  Otherwise, plain 'inherit' should be used
> (e.g. for newer version variants).

Aahh, that makes sense. :-)  Thank you.

For instance, does it mean that

--8<---------------cut here---------------start------------->8---
(define-public gst-plugins-good-qt
  (package
    (inherit gst-plugins-good)
    (name "gst-plugins-good-qt")
    (inputs
     (modify-inputs (package-inputs gst-plugins-good)
       (prepend qtbase-5
                qtdeclarative-5
                qtwayland-5
                qtx11extras)))))
--8<---------------cut here---------------end--------------->8---

would be incorrect?  It should be 'package/inherit', right?

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sat, 04 Mar 2023 03:33:01 GMT) Full text and rfc822 format available.

Message #74 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Sharlatan Hellseher <sharlatanus <at> gmail.com>, 61674 <at> debbugs.gnu.org
Subject: Re: [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Fri, 03 Mar 2023 22:32:48 -0500
Hi Simon,

Simon Tournier <zimon.toutoune <at> gmail.com> writes:

> Hi Maxim,
>
> On Fri, 3 Mar 2023 at 16:54, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:
>
>> If the inheritance is for *same-source/same-version* variants of a
>> package, they should use package/inherit, as any security issues found
>> in the parent package should also be applied to that package (since they
>> use the same source).  Otherwise, plain 'inherit' should be used
>> (e.g. for newer version variants).
>
> Aahh, that makes sense. :-)  Thank you.
>
> For instance, does it mean that
>
> (define-public gst-plugins-good-qt
>   (package
>     (inherit gst-plugins-good)
>     (name "gst-plugins-good-qt")
>     (inputs
>      (modify-inputs (package-inputs gst-plugins-good)
>        (prepend qtbase-5
>                 qtdeclarative-5
>                 qtwayland-5
>                 qtx11extras)))))
>
> would be incorrect?  It should be 'package/inherit', right?

It should be package/inherit yes, since they share the same source, thus
the same defects, thus should receive the same replacements/grafts (if
my preceding reasoning is correct :-)).

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#61674; Package guix-patches. (Sat, 04 Mar 2023 11:12:02 GMT) Full text and rfc822 format available.

Message #77 received at 61674 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 61674 <at> debbugs.gnu.org,
 Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: Re: [bug#61674] [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Sat, 4 Mar 2023 11:11:26 +0000
[Message part 1 (text/plain, inline)]
Hi all,

It was very insightful patch series I ever sent :-)
I hope I covered all recommendations in v3.

Thanks,
Oleg

On Sat, 4 Mar 2023, 03:32 Maxim Cournoyer, <maxim.cournoyer <at> gmail.com>
wrote:

> Hi Simon,
>
> Simon Tournier <zimon.toutoune <at> gmail.com> writes:
>
> > Hi Maxim,
> >
> > On Fri, 3 Mar 2023 at 16:54, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> wrote:
> >
> >> If the inheritance is for *same-source/same-version* variants of a
> >> package, they should use package/inherit, as any security issues found
> >> in the parent package should also be applied to that package (since they
> >> use the same source).  Otherwise, plain 'inherit' should be used
> >> (e.g. for newer version variants).
> >
> > Aahh, that makes sense. :-)  Thank you.
> >
> > For instance, does it mean that
> >
> > (define-public gst-plugins-good-qt
> >   (package
> >     (inherit gst-plugins-good)
> >     (name "gst-plugins-good-qt")
> >     (inputs
> >      (modify-inputs (package-inputs gst-plugins-good)
> >        (prepend qtbase-5
> >                 qtdeclarative-5
> >                 qtwayland-5
> >                 qtx11extras)))))
> >
> > would be incorrect?  It should be 'package/inherit', right?
>
> It should be package/inherit yes, since they share the same source, thus
> the same defects, thus should receive the same replacements/grafts (if
> my preceding reasoning is correct :-)).
>
> --
> Thanks,
> Maxim
>
[Message part 2 (text/html, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 07 Mar 2023 10:40:01 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Tue, 07 Mar 2023 10:40:01 GMT) Full text and rfc822 format available.

Message #82 received at 61674-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 61674-done <at> debbugs.gnu.org
Subject: Re: bug#61674: [PATCH 0/4] gnu: stellarium: Enable ShowMySky.
Date: Tue, 07 Mar 2023 11:39:19 +0100
Hi Oleg,

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Apr 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.