GNU bug report logs - #62306
[PATCH] gnu: Add phd2

Previous Next

Package: guix-patches;

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

Date: Mon, 20 Mar 2023 21:51:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

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 62306 in the body.
You can then email your comments to 62306 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#62306; Package guix-patches. (Mon, 20 Mar 2023 21:51:02 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. (Mon, 20 Mar 2023 21:51:02 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] gnu: Add phd2
Date: Mon, 20 Mar 2023 21:50:28 +0000
* gnu/packages/astronomy.scm (phd2): New variable.
---
 gnu/packages/astronomy.scm | 71 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 46839c802f..66040ad5f5 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -678,6 +678,77 @@ (define-public gnuastro
 programs for the manipulation and analysis of astronomical data.")
     (license license:gpl3+)))
 
+(define-public phd2
+  (package
+    (name "phd2")
+    (version "2.6.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/OpenPHDGuiding/phd2")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0n87xsv9gzrwk1ygws4vw397ffq40xybp5b3c3bd5kcmff0avaw9"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; NOTE: Keep eye on the thirdparty directory as the bundled names
+           ;; change from relase to release.
+           ;;
+           ;; Remove bundles.
+           (with-directory-excursion "thirdparty"
+             (for-each delete-file-recursively
+                       '("HID_Utilities"
+                         "MallincamGuider-OSX-dylib-source.zip"
+                         "VidCapture"
+                         "cfitsio-3.47-patched.tar.gz"
+                         "cfitsio-README-PHD2.txt"
+                         "cfitsio-snprintf.patch"
+                         "eigen-eigen-67e894c6cd8f.tar.bz2"
+                         "gettext-0.14.4-bin.zip"
+                         "gettext-0.14.4-dep.zip"
+                         "gtest-1.7.0.zip"
+                         "indiclient-44aaf5d3-win32.zip"
+                         "libcurl-7.54.0-win32.zip"
+                         "libdc1394-2.2.2.tar.gz"
+                         "libindi-58b26c584049e1b9ecd55aa5f4a225677a417898.tar.gz"
+                         "libusb-1.0.21.tar.bz2"
+                         "openssag")))))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DOPENSOURCE_ONLY=yes"
+              "-DUSE_SYSTEM_CFITSIO=yes"
+              "-DUSE_SYSTEM_EIGEN3=yes"
+              "-DUSE_SYSTEM_GTEST=yes"
+              "-DUSE_SYSTEM_LIBINDI=yes"
+              "-DUSE_SYSTEM_LIBUSB=yes")))
+    (native-inputs
+     (list gettext-minimal
+           googletest
+           perl
+           pkg-config
+           python-wrapper))
+    (inputs
+     (list cfitsio
+           curl-minimal
+           eigen
+           gtk+
+           indi
+           libnova
+           libusb
+           wxwidgets
+           zlib))
+    (home-page "https://openphdguiding.org")
+    (synopsis "Teleskope guiding software")
+    (description
+     "PHD2 is the enhanced, second generation version of the PHD guiding
+software from Stark Labs to simplify the process of tracking a guide star.")
+    (license license:bsd-3)))
+
 (define-public sextractor
   (package
     (name "sextractor")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62306; Package guix-patches. (Tue, 21 Mar 2023 19:25:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62306 <at> debbugs.gnu.org
Subject: Re: bug#62306: [PATCH] gnu: Add phd2
Date: Tue, 21 Mar 2023 15:24:04 -0400
Hi,

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

> * gnu/packages/astronomy.scm (phd2): New variable.
> ---
>  gnu/packages/astronomy.scm | 71 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 71 insertions(+)
>
> diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
> index 46839c802f..66040ad5f5 100644
> --- a/gnu/packages/astronomy.scm
> +++ b/gnu/packages/astronomy.scm
> @@ -678,6 +678,77 @@ (define-public gnuastro
>  programs for the manipulation and analysis of astronomical data.")
>      (license license:gpl3+)))
>  
> +(define-public phd2
> +  (package
> +    (name "phd2")
> +    (version "2.6.11")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/OpenPHDGuiding/phd2")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0n87xsv9gzrwk1ygws4vw397ffq40xybp5b3c3bd5kcmff0avaw9"))
> +       (modules '((guix build utils)))
> +       (snippet
> +        '(begin
> +           ;; NOTE: Keep eye on the thirdparty directory as the bundled names
> +           ;; change from relase to release.
> +           ;;
> +           ;; Remove bundles.
> +           (with-directory-excursion "thirdparty"
> +             (for-each delete-file-recursively
> +                       '("HID_Utilities"
> +                         "MallincamGuider-OSX-dylib-source.zip"
> +                         "VidCapture"
> +                         "cfitsio-3.47-patched.tar.gz"
> +                         "cfitsio-README-PHD2.txt"
> +                         "cfitsio-snprintf.patch"
> +                         "eigen-eigen-67e894c6cd8f.tar.bz2"
> +                         "gettext-0.14.4-bin.zip"
> +                         "gettext-0.14.4-dep.zip"
> +                         "gtest-1.7.0.zip"
> +                         "indiclient-44aaf5d3-win32.zip"
> +                         "libcurl-7.54.0-win32.zip"
> +                         "libdc1394-2.2.2.tar.gz"
> +                         "libindi-58b26c584049e1b9ecd55aa5f4a225677a417898.tar.gz"
> +                         "libusb-1.0.21.tar.bz2"
> +                         "openssag")))))))

To make maintenance easier, perhaps you could reuse the 'delete-all-but'
procedure from turbovnc or similar?  This has the benefit of listing
what is kept (more transparent), and if the things we do care for change
names, we will know.

Could you please send a v2 with this suggestion implemented?

-- 
Thanks,
Maxim




Added tag(s) moreinfo. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 21 Mar 2023 19:25:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#62306; Package guix-patches. (Wed, 22 Mar 2023 11:06:01 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 62306 <at> debbugs.gnu.org
Subject: Re: bug#62306: [PATCH] gnu: Add phd2
Date: Wed, 22 Mar 2023 11:04:54 +0000
[Message part 1 (text/plain, inline)]
Hi Maxim,

Thank you for the review. I'll check that procedure and prepare simplified
v2 patch.

Oleg

On Tue, 21 Mar 2023, 19:24 Maxim Cournoyer, <maxim.cournoyer <at> gmail.com>
wrote:

> Hi,
>
> Sharlatan Hellseher <sharlatanus <at> gmail.com> writes:
>
> > * gnu/packages/astronomy.scm (phd2): New variable.
> > ---
> >  gnu/packages/astronomy.scm | 71 ++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 71 insertions(+)
> >
> > diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
> > index 46839c802f..66040ad5f5 100644
> > --- a/gnu/packages/astronomy.scm
> > +++ b/gnu/packages/astronomy.scm
> > @@ -678,6 +678,77 @@ (define-public gnuastro
> >  programs for the manipulation and analysis of astronomical data.")
> >      (license license:gpl3+)))
> >
> > +(define-public phd2
> > +  (package
> > +    (name "phd2")
> > +    (version "2.6.11")
> > +    (source
> > +     (origin
> > +       (method git-fetch)
> > +       (uri (git-reference
> > +             (url "https://github.com/OpenPHDGuiding/phd2")
> > +             (commit (string-append "v" version))))
> > +       (file-name (git-file-name name version))
> > +       (sha256
> > +        (base32 "0n87xsv9gzrwk1ygws4vw397ffq40xybp5b3c3bd5kcmff0avaw9"))
> > +       (modules '((guix build utils)))
> > +       (snippet
> > +        '(begin
> > +           ;; NOTE: Keep eye on the thirdparty directory as the bundled
> names
> > +           ;; change from relase to release.
> > +           ;;
> > +           ;; Remove bundles.
> > +           (with-directory-excursion "thirdparty"
> > +             (for-each delete-file-recursively
> > +                       '("HID_Utilities"
> > +                         "MallincamGuider-OSX-dylib-source.zip"
> > +                         "VidCapture"
> > +                         "cfitsio-3.47-patched.tar.gz"
> > +                         "cfitsio-README-PHD2.txt"
> > +                         "cfitsio-snprintf.patch"
> > +                         "eigen-eigen-67e894c6cd8f.tar.bz2"
> > +                         "gettext-0.14.4-bin.zip"
> > +                         "gettext-0.14.4-dep.zip"
> > +                         "gtest-1.7.0.zip"
> > +                         "indiclient-44aaf5d3-win32.zip"
> > +                         "libcurl-7.54.0-win32.zip"
> > +                         "libdc1394-2.2.2.tar.gz"
> > +
>  "libindi-58b26c584049e1b9ecd55aa5f4a225677a417898.tar.gz"
> > +                         "libusb-1.0.21.tar.bz2"
> > +                         "openssag")))))))
>
> To make maintenance easier, perhaps you could reuse the 'delete-all-but'
> procedure from turbovnc or similar?  This has the benefit of listing
> what is kept (more transparent), and if the things we do care for change
> names, we will know.
>
> Could you please send a v2 with this suggestion implemented?
>
> --
> Thanks,
> Maxim
>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#62306; Package guix-patches. (Mon, 27 Mar 2023 08:48:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62306 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH v2] gnu: Add phd2.
Date: Mon, 27 Mar 2023 09:46:49 +0100
* gnu/packages/astronomy.scm (phd2): New variable.
---
 gnu/packages/astronomy.scm | 70 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 46839c802f..6ca3c4f4e7 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -678,6 +678,76 @@ (define-public gnuastro
 programs for the manipulation and analysis of astronomical data.")
     (license license:gpl3+)))
 
+(define-public phd2
+  (package
+    (name "phd2")
+    (version "2.6.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/OpenPHDGuiding/phd2")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0n87xsv9gzrwk1ygws4vw397ffq40xybp5b3c3bd5kcmff0avaw9"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-26)))
+       (snippet
+        #~(begin
+            ;; TODO: This snippet is sourced from
+            ;; guix/gnu/packages/vnc.scm. It might be merged with
+            ;; `delete-file-recursively' which can have `ignore' optional
+            ;; argument.
+            (define (delete-all-but directory . preserve)
+              (define (directory? x)
+                (and=> (stat x #f)
+                       (compose (cut eq? 'directory <>) stat:type)))
+              (with-directory-excursion directory
+                (let* ((pred
+                        (negate (cut member <> (append '("." "..") preserve))))
+                       (items (scandir "." pred)))
+                  (for-each (lambda (item)
+                              (if (directory? item)
+                                  (delete-file-recursively item)
+                                  (delete-file item)))
+                            items))))
+            ;; XXX: Check this list of ignored items in next release.
+            (delete-all-but "thirdparty" "thirdparty.cmake")))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-DOPENSOURCE_ONLY=yes"
+              "-DUSE_SYSTEM_CFITSIO=yes"
+              "-DUSE_SYSTEM_EIGEN3=yes"
+              "-DUSE_SYSTEM_GTEST=yes"
+              "-DUSE_SYSTEM_LIBINDI=yes"
+              "-DUSE_SYSTEM_LIBUSB=yes")))
+    (native-inputs
+     (list gettext-minimal
+           googletest
+           perl
+           pkg-config
+           python-wrapper))
+    (inputs
+     (list cfitsio
+           curl-minimal
+           eigen
+           gtk+
+           indi
+           libnova
+           libusb
+           wxwidgets
+           zlib))
+    (home-page "https://openphdguiding.org")
+    (synopsis "Teleskope guiding software")
+    (description
+     "PHD2 is the enhanced, second generation version of the PHD guiding software
+from Stark Labs.")
+    (license license:bsd-3)))
+
 (define-public sextractor
   (package
     (name "sextractor")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62306; Package guix-patches. (Sun, 09 Apr 2023 19:01:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62306 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Date: Sun, 9 Apr 2023 20:00:05 +0100
Hi,

Just a gentle ping on the status of this pach. Let me know if it
requirers to be modified more.

Thanks,
Oleg

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

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 11 Apr 2023 15:57:01 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Tue, 11 Apr 2023 15:57:01 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62306-done <at> debbugs.gnu.org
Subject: Re: bug#62306: [PATCH] gnu: Add phd2
Date: Tue, 11 Apr 2023 11:56:06 -0400
Hi,

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

> * gnu/packages/astronomy.scm (phd2): New variable.
> ---
>  gnu/packages/astronomy.scm | 70 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 70 insertions(+)
>
> diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
> index 46839c802f..6ca3c4f4e7 100644
> --- a/gnu/packages/astronomy.scm
> +++ b/gnu/packages/astronomy.scm
> @@ -678,6 +678,76 @@ (define-public gnuastro
>  programs for the manipulation and analysis of astronomical data.")
>      (license license:gpl3+)))
>  
> +(define-public phd2
> +  (package
> +    (name "phd2")
> +    (version "2.6.11")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/OpenPHDGuiding/phd2")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0n87xsv9gzrwk1ygws4vw397ffq40xybp5b3c3bd5kcmff0avaw9"))
> +       (modules '((guix build utils)
> +                  (ice-9 ftw)
> +                  (srfi srfi-26)))
> +       (snippet
> +        #~(begin
> +            ;; TODO: This snippet is sourced from
> +            ;; guix/gnu/packages/vnc.scm. It might be merged with
> +            ;; `delete-file-recursively' which can have `ignore' optional
> +            ;; argument.
> +            (define (delete-all-but directory . preserve)
> +              (define (directory? x)
> +                (and=> (stat x #f)
> +                       (compose (cut eq? 'directory <>) stat:type)))
> +              (with-directory-excursion directory
> +                (let* ((pred
> +                        (negate (cut member <> (append '("." "..") preserve))))
> +                       (items (scandir "." pred)))
> +                  (for-each (lambda (item)
> +                              (if (directory? item)
> +                                  (delete-file-recursively item)
> +                                  (delete-file item)))
> +                            items))))
> +            ;; XXX: Check this list of ignored items in next release.
> +            (delete-all-but "thirdparty" "thirdparty.cmake")))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     (list
> +      #:configure-flags
> +      #~(list "-DOPENSOURCE_ONLY=yes"
> +              "-DUSE_SYSTEM_CFITSIO=yes"
> +              "-DUSE_SYSTEM_EIGEN3=yes"
> +              "-DUSE_SYSTEM_GTEST=yes"
> +              "-DUSE_SYSTEM_LIBINDI=yes"
> +              "-DUSE_SYSTEM_LIBUSB=yes")))
> +    (native-inputs
> +     (list gettext-minimal
> +           googletest
> +           perl
> +           pkg-config
> +           python-wrapper))
> +    (inputs
> +     (list cfitsio
> +           curl-minimal
> +           eigen
> +           gtk+
> +           indi
> +           libnova
> +           libusb
> +           wxwidgets
> +           zlib))
> +    (home-page "https://openphdguiding.org")
> +    (synopsis "Teleskope guiding software")
> +    (description
> +     "PHD2 is the enhanced, second generation version of the PHD guiding software
> +from Stark Labs.")
> +    (license license:bsd-3)))
> +
>  (define-public sextractor
>    (package
>      (name "sextractor")

I've taken the liberty to apply the following cosmetic adjustments:

--8<---------------cut here---------------start------------->8---
1 file changed, 10 insertions(+), 16 deletions(-)
gnu/packages/astronomy.scm | 26 ++++++++++----------------

modified   gnu/packages/astronomy.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2019 by Amar Singh <nly <at> disroot.org>
 ;;; Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv <at> posteo.net>
-;;; Copyright © 2021, 2022 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2021, 2022, 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2021, 2022 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2021 Greg Hogan <code <at> greghogan.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
@@ -696,10 +696,7 @@ (define-public phd2
                   (srfi srfi-26)))
        (snippet
         #~(begin
-            ;; TODO: This snippet is sourced from
-            ;; guix/gnu/packages/vnc.scm. It might be merged with
-            ;; `delete-file-recursively' which can have `ignore' optional
-            ;; argument.
+            ;; XXX: 'delete-all-but' is copied from the turbovnc package.

Rationale: the suggestion to enhance delete-file-recursively would be
better discussed on guix-devel.

             (define (delete-all-but directory . preserve)
               (define (directory? x)
                 (and=> (stat x #f)
@@ -713,27 +710,24 @@ (define (directory? x)
                                   (delete-file-recursively item)
                                   (delete-file item)))
                             items))))
-            ;; XXX: Check this list of ignored items in next release.
             (delete-all-but "thirdparty" "thirdparty.cmake")))))

Rationale: we're safe by default.  If the package breaks on a version
update, its maintainer will be forced into looking into that :-).
     
     (build-system cmake-build-system)
     (arguments
-     (list
-      #:configure-flags
-      #~(list "-DOPENSOURCE_ONLY=yes"
-              "-DUSE_SYSTEM_CFITSIO=yes"
-              "-DUSE_SYSTEM_EIGEN3=yes"
-              "-DUSE_SYSTEM_GTEST=yes"
-              "-DUSE_SYSTEM_LIBINDI=yes"
-              "-DUSE_SYSTEM_LIBUSB=yes")))
+     (list #:configure-flags #~(list "-DOPENSOURCE_ONLY=yes"
+                                     "-DUSE_SYSTEM_CFITSIO=yes"
+                                     "-DUSE_SYSTEM_EIGEN3=yes"
+                                     "-DUSE_SYSTEM_GTEST=yes"
+                                     "-DUSE_SYSTEM_LIBINDI=yes"
+                                     "-DUSE_SYSTEM_LIBUSB=yes")))

Stylistic.

     (native-inputs
      (list gettext-minimal
            googletest
            perl
            pkg-config
-           python-wrapper))
+           python))
     (inputs
      (list cfitsio
-           curl-minimal
+           curl

curl-minimal doesn't exist anymore.  It had long been deprecated (2020).

            eigen
            gtk+
            indi
--8<---------------cut here---------------end--------------->8---

And installed it!  Thank you!

-- 
Thanks,
Maxim




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

This bug report was last modified 349 days ago.

Previous Next


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