GNU bug report logs - #60793
[PATCH] gnu: Add julia-cfitsio-jll.

Previous Next

Package: guix-patches;

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

Date: Fri, 13 Jan 2023 22:18:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

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 60793 in the body.
You can then email your comments to 60793 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#60793; Package guix-patches. (Fri, 13 Jan 2023 22:18: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. (Fri, 13 Jan 2023 22:18: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] gnu: Add julia-cfitsio-jll.
Date: Fri, 13 Jan 2023 22:16:58 +0000
* gnu/packages/julia-jll.scm (julia-cfitsio-jll): New variable.
---
 gnu/packages/julia-jll.scm | 45 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm
index 2b0f644736..364088c4b0 100644
--- a/gnu/packages/julia-jll.scm
+++ b/gnu/packages/julia-jll.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv <at> pm.me>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,12 +22,14 @@
 
 (define-module (gnu packages julia-jll)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system julia)
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages astronomy)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fontutils)
@@ -146,6 +149,48 @@ (define-public julia-cairo-jll
     (description "This package provides a wrapper for the cairo library.")
     (license license:expat)))
 
+(define-public julia-cfitsio-jll
+  (package
+    (name "julia-cfitsio-jll")
+    (version "4.0.0+0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaBinaryWrappers/CFITSIO_jll.jl")
+             (commit (string-append "CFITSIO-v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1k0mqmpyfjr3ibcmda08llw8m166zw0n3lh5y5aj81q37lrxw990"))))
+    (build-system julia-build-system)
+    (arguments
+     (list
+      #:tests? #f ; no runtests
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'link-depot 'override-binary-path
+            (lambda* (#:key inputs #:allow-other-keys)
+              (map
+               (lambda (wrapper)
+                 (substitute* wrapper
+                   (("using LibCURL_jll") "") ; Not require to download cfitsio.
+                   (("using Zlib_jll") "") ; Not require to upnpack not donwloaded archvie.
+                   (("generate_init_header.*") "generate_init_header()\n" )
+                   (("generate_wrapper_header.*")
+                    (string-append
+                     "generate_wrapper_header(\"CFITSIO\", \""
+                     (assoc-ref inputs "cfitsio") "\")\n"))))
+               ;; There's a Julia file for each platform, override them all
+               (find-files "src/wrappers/" "\\.jl$")))))))
+    (inputs
+     (list cfitsio))
+    (propagated-inputs
+     (list julia-jllwrappers))
+    (home-page "https://github.com/JuliaBinaryWrappers/CFITSIO_jll.jl")
+    (synopsis "cfitsio library wrappers")
+    (description "This package provides a wrapper for the cfitsio library.")
+    (license license:expat)))
+
 (define-public julia-compilersupportlibraries-jll
   (package
     (name "julia-compilersupportlibraries-jll")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Mon, 16 Jan 2023 18:37:02 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 60793 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: Re: [bug#60793] [PATCH] gnu: Add julia-cfitsio-jll.
Date: Mon, 16 Jan 2023 18:08:30 +0100
Hi,

On ven., 13 janv. 2023 at 22:16, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:
> * gnu/packages/julia-jll.scm (julia-cfitsio-jll): New variable.

Thank for this patch.

Well, out of curiosity, why is this package required?  I mean, usually
JLL packages are binding to access from Julia to some libraries.
Therefore, do you plan to use this package for another regular Julia
package?


> +  #:use-module (guix gexp)

[...]

> +      #~(modify-phases %standard-phases
> +          (add-after 'link-depot 'override-binary-path
> +            (lambda* (#:key inputs #:allow-other-keys)

[...]

> +                     (assoc-ref inputs "cfitsio") "\")\n"))))

I do not think (guix gexp) is required here.  For instance, other
packages just use, for instance:

--8<---------------cut here---------------start------------->8---
    (arguments
     '(#:tests? #f ; no runtests
       #:phases
       (modify-phases %standard-phases
         (add-after 'link-depot 'override-binary-path
           (lambda* (#:key inputs #:allow-other-keys)
             (map
               (lambda (wrapper)
                 (substitute* wrapper
                   (("artifact\"FFMPEG\"")
                    (string-append "\"" (assoc-ref inputs "ffmpeg") "\""))))
               ;; There's a Julia file for each platform, override them all
               (find-files "src/wrappers/" "\\.jl$")))))))
--8<---------------cut here---------------end--------------->8---


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Mon, 16 Jan 2023 20:37:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: 60793 <at> debbugs.gnu.org
Subject: Re: [bug#60793] [PATCH] gnu: Add julia-cfitsio-jll.
Date: Mon, 16 Jan 2023 20:36:03 +0000
[Message part 1 (text/plain, inline)]
Hi Simon,

Thanks for your review and comments.

Yes it's a long journey to bring Julia's Astronomical projects to Guix.

Here is my plan:
https://git.sr.ht/~hellseher/ffab/tree/main/item/org/astronomy.org#L1202

cfitsio, wcs and erfa would be essential jll bindings for base Julia
packages.

I've got a question on how to group Julia packages related just to
Astronomy. gnu/packages/astronomy.scm contains python bindings to cfitsio,
wcs and erfa would I follow the same pass and add Julia packages next to
them?

Regards,
Oleg

On Mon, 16 Jan 2023, 18:36 Simon Tournier, <zimon.toutoune <at> gmail.com> wrote:

> Hi,
>
> On ven., 13 janv. 2023 at 22:16, Sharlatan Hellseher <
> sharlatanus <at> gmail.com> wrote:
> > * gnu/packages/julia-jll.scm (julia-cfitsio-jll): New variable.
>
> Thank for this patch.
>
> Well, out of curiosity, why is this package required?  I mean, usually
> JLL packages are binding to access from Julia to some libraries.
> Therefore, do you plan to use this package for another regular Julia
> package?
>
>
> > +  #:use-module (guix gexp)
>
> [...]
>
> > +      #~(modify-phases %standard-phases
> > +          (add-after 'link-depot 'override-binary-path
> > +            (lambda* (#:key inputs #:allow-other-keys)
>
> [...]
>
> > +                     (assoc-ref inputs "cfitsio") "\")\n"))))
>
> I do not think (guix gexp) is required here.  For instance, other
> packages just use, for instance:
>
> --8<---------------cut here---------------start------------->8---
>     (arguments
>      '(#:tests? #f ; no runtests
>        #:phases
>        (modify-phases %standard-phases
>          (add-after 'link-depot 'override-binary-path
>            (lambda* (#:key inputs #:allow-other-keys)
>              (map
>                (lambda (wrapper)
>                  (substitute* wrapper
>                    (("artifact\"FFMPEG\"")
>                     (string-append "\"" (assoc-ref inputs "ffmpeg")
> "\""))))
>                ;; There's a Julia file for each platform, override them all
>                (find-files "src/wrappers/" "\\.jl$")))))))
> --8<---------------cut here---------------end--------------->8---
>
>
> Cheers,
> simon
>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Tue, 17 Jan 2023 08:40:02 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 60793 <at> debbugs.gnu.org
Subject: Re: [bug#60793] [PATCH] gnu: Add julia-cfitsio-jll.
Date: Tue, 17 Jan 2023 09:03:53 +0100
Hi,

On Mon, 16 Jan 2023 at 20:36, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:

> Yes it's a long journey to bring Julia's Astronomical projects to
> Guix.

Cool!  Thank you for this effort.


> I've got a question on how to group Julia packages related just to
> Astronomy. gnu/packages/astronomy.scm contains python bindings to cfitsio,
> wcs and erfa would I follow the same pass and add Julia packages next to
> them?

Well, I think all Julia packages should go to gnu/packages/julia-xyz.scm
with the prefix ’julia-’ for the symbol and the package name.

If, or when, the Julia packages related to astronomy will be too many,
then it will be possible to just move them to
gnu/packages/julia-astronomy.scm.

Last, when writing new Julia packages, please consider some implicit
conventions in these Julia-related modules:

 + sort alphabetically, package name and inputs,

 + if one test does not pass, please disallow it using something like:
   ’#~(modify-phases %standard-phases (add-after 'link-depot
   'skip-failing-test’ (gexp and after link-depot),

 + try set the packages used by the tests under native-inputs.

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Sun, 29 Jan 2023 22:28:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: 60793 <at> debbugs.gnu.org
Subject: Re: [bug#60793] [PATCH] gnu: Add julia-cfitsio-jll.
Date: Sun, 29 Jan 2023 22:26:59 +0000
Hi Simon,

I've prepared the full series of patches which include
julia-cfitsio-jll -> julia-cfitsio -> julia-fitsio.
All of the them put in alphabetical order, passed lint and build on
x86_64 hardware.

On Tue, 17 Jan 2023 at 08:39, Simon Tournier <zimon.toutoune <at> gmail.com> wrote:
>
> Hi,
>
> On Mon, 16 Jan 2023 at 20:36, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:
>
> > Yes it's a long journey to bring Julia's Astronomical projects to
> > Guix.
>
> Cool!  Thank you for this effort.
>
>
> > I've got a question on how to group Julia packages related just to
> > Astronomy. gnu/packages/astronomy.scm contains python bindings to cfitsio,
> > wcs and erfa would I follow the same pass and add Julia packages next to
> > them?
>
> Well, I think all Julia packages should go to gnu/packages/julia-xyz.scm
> with the prefix ’julia-’ for the symbol and the package name.
>
> If, or when, the Julia packages related to astronomy will be too many,
> then it will be possible to just move them to
> gnu/packages/julia-astronomy.scm.
>
> Last, when writing new Julia packages, please consider some implicit
> conventions in these Julia-related modules:
>
>  + sort alphabetically, package name and inputs,
>
>  + if one test does not pass, please disallow it using something like:
>    ’#~(modify-phases %standard-phases (add-after 'link-depot
>    'skip-failing-test’ (gexp and after link-depot),
>
>  + try set the packages used by the tests under native-inputs.
>
> Cheers,
> simon



-- 

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




Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Sun, 29 Jan 2023 22:30:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 60793 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/3] gnu: Add julia-cfitsio-jll.
Date: Sun, 29 Jan 2023 22:29:23 +0000
* gnu/packages/julia-jll.scm (julia-cfitsio-jll): New variable.
---
 gnu/packages/julia-jll.scm | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm
index 2b0f644736..7625ff512a 100644
--- a/gnu/packages/julia-jll.scm
+++ b/gnu/packages/julia-jll.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv <at> pm.me>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@ (define-module (gnu packages julia-jll)
   #:use-module (guix utils)
   #:use-module (guix build-system julia)
   #:use-module (gnu packages)
+  #:use-module (gnu packages astronomy)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
@@ -146,6 +148,47 @@ (define-public julia-cairo-jll
     (description "This package provides a wrapper for the cairo library.")
     (license license:expat)))
 
+(define-public julia-cfitsio-jll
+  (package
+    (name "julia-cfitsio-jll")
+    (version "4.0.0+0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaBinaryWrappers/CFITSIO_jll.jl")
+             (commit (string-append "CFITSIO-v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1k0mqmpyfjr3ibcmda08llw8m166zw0n3lh5y5aj81q37lrxw990"))))
+    (build-system julia-build-system)
+    (arguments
+     '(#:tests? #f ; no runtests
+      #:phases
+      (modify-phases %standard-phases
+          (add-after 'link-depot 'override-binary-path
+            (lambda* (#:key inputs #:allow-other-keys)
+              (map
+               (lambda (wrapper)
+                 (substitute* wrapper
+                   (("using LibCURL_jll") "") ; We use Guix's cfitsio
+                   (("using Zlib_jll") "") ; Not require to upnpack not donwloaded archvie.
+                   (("generate_init_header.*") "generate_init_header()\n" )
+                   (("generate_wrapper_header.*")
+                    (string-append
+                     "generate_wrapper_header(\"CFITSIO\", \""
+                     (assoc-ref inputs "cfitsio") "\")\n"))))
+               ;; There's a Julia file for each platform, override them all
+               (find-files "src/wrappers/" "\\.jl$")))))))
+    (inputs
+     (list cfitsio))
+    (propagated-inputs
+     (list julia-jllwrappers))
+    (home-page "https://github.com/JuliaBinaryWrappers/CFITSIO_jll.jl")
+    (synopsis "cfitsio library wrappers")
+    (description "This package provides a wrapper for the cfitsio library.")
+    (license license:expat)))
+
 (define-public julia-compilersupportlibraries-jll
   (package
     (name "julia-compilersupportlibraries-jll")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Sun, 29 Jan 2023 22:30:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 60793 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 2/3] gnu: Add julia-cfitsio.
Date: Sun, 29 Jan 2023 22:29:24 +0000
* gnu/packages/julia-xyz.scm (julia-cfitsio): New variable.
---
 gnu/packages/julia-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 414aba03f0..ff6862c4f6 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -746,6 +746,39 @@ (define-public julia-cenum
     (description "This package provides a C-compatible enum for Julia.")
     (license license:expat)))
 
+(define-public julia-cfitsio
+  (package
+    (name "julia-cfitsio")
+    (version "1.4.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaAstro/CFITSIO.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "05bxzzjcc021p3hi092h06r2q7qnvql0xz1alggi83i0pp1mxp6d"))))
+    (build-system julia-build-system)
+    (native-inputs (list julia-aqua))
+    (propagated-inputs (list julia-cfitsio-jll))
+    (home-page "https://github.com/JuliaAstro/CFITSIO.jl")
+    (synopsis "C-style interface to the libcfitsio library")
+    (description "This package provides Julia implementation of C-style interface to CFITSIO
+functions with following features:
+@itemize
+
+@item Function names closely mirror the C interface (e.g., @code{fits_open_file()}).
+
+@item Functions operate on @code{FITSFile}, a thin wrapper for fitsfile C struct
+(@code{FITSFile} has concept of \"current HDU\", as in CFITSIO).
+
+@item Note that the wrapper functions do check the return status from CFITSIO
+and throw an error with the appropriate message.
+
+@end itemize")
+    (license license:expat)))
+
 (define-public julia-chainrules
   (package
     (name "julia-chainrules")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Sun, 29 Jan 2023 22:30:03 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 60793 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 3/3] gnu: Add julia-fitsio.
Date: Sun, 29 Jan 2023 22:29:25 +0000
* gnu/packages/julia-xyz.scm (julia-fitsio): New variable.
---
 gnu/packages/julia-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index ff6862c4f6..5a2b6b8c22 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021, 2022 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2130,6 +2131,31 @@ (define-public julia-finitedifferences
 using finite difference.")
     (license license:expat)))
 
+(define-public julia-fitsio
+  (package
+    (name "julia-fitsio")
+    (version "0.17.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaAstro/FITSIO.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "10w7cdb2cvcwpkcfdz2fwl4ji5rfdv8w9msc9gfd8d34k58bk8c5"))))
+    (build-system julia-build-system)
+    (native-inputs
+     (list julia-aqua julia-orderedcollections))
+    (propagated-inputs
+     (list julia-cfitsio julia-reexport julia-tables))
+    (home-page "https://github.com/JuliaAstro/CFITSIO.jl")
+    (synopsis "Astronomical FITS file support for Julia")
+    (description "This package provides Julia implementation for reading and writing
+@acronym{FITS, Flexible Image Transport System} files, based on the
+@code{cfitsio} library.")
+    (license license:expat)))
+
 (define-public julia-fixedpointnumbers
   (let ((commit "59ee94b93f2f1ee75544ef44187fc0e440cd8015")
         (revision "1"))
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Mon, 30 Jan 2023 11:13:01 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>, 60793 <at> debbugs.gnu.org,
 Efraim Flashner <efraim <at> flashner.co.il>
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: Re: [bug#60793] [PATCH 1/3] gnu: Add julia-cfitsio-jll.
Date: Mon, 30 Jan 2023 11:59:23 +0100
Hi,

On dim., 29 janv. 2023 at 22:29, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:

> +      #:phases
> +      (modify-phases %standard-phases
> +          (add-after 'link-depot 'override-binary-path
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (map
> +               (lambda (wrapper)
> +                 (substitute* wrapper
> +                   (("using LibCURL_jll") "") ; We use Guix's cfitsio
> +                   (("using Zlib_jll") "") ; Not require to upnpack not donwloaded archvie.
                                                              --^
                                                            Typo

Typo: s/upnpack/unpack

> +    (synopsis "cfitsio library wrappers")

--8<---------------cut here---------------start------------->8---
gnu/packages/julia-jll.scm:188:14: julia-cfitsio-jll <at> 4.0.0+0: synopsis should start with an upper-case letter or digit
--8<---------------cut here---------------end--------------->8---

Maybe,

    (synopsis "CFITSIO library wrappers")

because it seems the official name:
<https://heasarc.gsfc.nasa.gov/fitsio/>.  All capital.


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Mon, 30 Jan 2023 11:13:02 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>, Efraim Flashner
 <efraim <at> flashner.co.il>
Cc: 60793 <at> debbugs.gnu.org
Subject: Re: [bug#60793] [PATCH] gnu: Add julia-cfitsio-jll.
Date: Mon, 30 Jan 2023 12:11:53 +0100
Hi,

On dim., 29 janv. 2023 at 22:26, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:

> I've prepared the full series of patches which include
> julia-cfitsio-jll -> julia-cfitsio -> julia-fitsio.
> All of the them put in alphabetical order, passed lint and build on
> x86_64 hardware.

LGTM.  I have tweaked in v2.
Efraim?

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Mon, 30 Jan 2023 11:13:02 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: 60793 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, efraim <at> flashner.co.il
Subject: [PATCH v2 1/3] gnu: Add julia-cfitsio-jll.
Date: Mon, 30 Jan 2023 12:12:09 +0100
From: Sharlatan Hellseher <sharlatanus <at> gmail.com>

* gnu/packages/julia-jll.scm (julia-cfitsio-jll): New variable.
---
 gnu/packages/julia-jll.scm | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/julia-jll.scm b/gnu/packages/julia-jll.scm
index 2b0f644736..80e4508196 100644
--- a/gnu/packages/julia-jll.scm
+++ b/gnu/packages/julia-jll.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv <at> pm.me>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@ (define-module (gnu packages julia-jll)
   #:use-module (guix utils)
   #:use-module (guix build-system julia)
   #:use-module (gnu packages)
+  #:use-module (gnu packages astronomy)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
@@ -146,6 +148,47 @@ (define-public julia-cairo-jll
     (description "This package provides a wrapper for the cairo library.")
     (license license:expat)))
 
+(define-public julia-cfitsio-jll
+  (package
+    (name "julia-cfitsio-jll")
+    (version "4.0.0+0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaBinaryWrappers/CFITSIO_jll.jl")
+             (commit (string-append "CFITSIO-v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1k0mqmpyfjr3ibcmda08llw8m166zw0n3lh5y5aj81q37lrxw990"))))
+    (build-system julia-build-system)
+    (arguments
+     '(#:tests? #f ; no runtests
+      #:phases
+      (modify-phases %standard-phases
+          (add-after 'link-depot 'override-binary-path
+            (lambda* (#:key inputs #:allow-other-keys)
+              (map
+               (lambda (wrapper)
+                 (substitute* wrapper
+                   (("using LibCURL_jll") "") ; We use Guix's cfitsio
+                   (("using Zlib_jll") "") ; Not require to unpack not donwloaded archvie.
+                   (("generate_init_header.*") "generate_init_header()\n" )
+                   (("generate_wrapper_header.*")
+                    (string-append
+                     "generate_wrapper_header(\"CFITSIO\", \""
+                     (assoc-ref inputs "cfitsio") "\")\n"))))
+               ;; There's a Julia file for each platform, override them all
+               (find-files "src/wrappers/" "\\.jl$")))))))
+    (inputs
+     (list cfitsio))
+    (propagated-inputs
+     (list julia-jllwrappers))
+    (home-page "https://github.com/JuliaBinaryWrappers/CFITSIO_jll.jl")
+    (synopsis "CFITSIO library wrappers")
+    (description "This package provides a wrapper for the cfitsio library.")
+    (license license:expat)))
+
 (define-public julia-compilersupportlibraries-jll
   (package
     (name "julia-compilersupportlibraries-jll")

base-commit: 595b53b74e3ef57a1c0c96108ba86d38a170a241
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Mon, 30 Jan 2023 11:13:02 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: 60793 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, efraim <at> flashner.co.il
Subject: [PATCH v2 2/3] gnu: Add julia-cfitsio.
Date: Mon, 30 Jan 2023 12:12:10 +0100
From: Sharlatan Hellseher <sharlatanus <at> gmail.com>

* gnu/packages/julia-xyz.scm (julia-cfitsio): New variable.
---
 gnu/packages/julia-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 414aba03f0..8c7f0f70cf 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -746,6 +746,36 @@ (define-public julia-cenum
     (description "This package provides a C-compatible enum for Julia.")
     (license license:expat)))
 
+(define-public julia-cfitsio
+  (package
+    (name "julia-cfitsio")
+    (version "1.4.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaAstro/CFITSIO.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "05bxzzjcc021p3hi092h06r2q7qnvql0xz1alggi83i0pp1mxp6d"))))
+    (build-system julia-build-system)
+    (native-inputs (list julia-aqua))
+    (propagated-inputs (list julia-cfitsio-jll))
+    (home-page "https://github.com/JuliaAstro/CFITSIO.jl")
+    (synopsis "C-style interface to the libcfitsio library")
+    (description "This package provides Julia implementation of C-style
+interface to CFITSIO functions with following features:
+@itemize
+@item Function names closely mirror the C interface (e.g.,
+@code{fits_open_file()}).
+@item Functions operate on @code{FITSFile}, a thin wrapper for fitsfile C
+struct (@code{FITSFile} has concept of \"current HDU\", as in CFITSIO).
+@item Wrapper functions do check the return status from CFITSIO and throw an
+error with the appropriate message.
+@end itemize")
+    (license license:expat)))
+
 (define-public julia-chainrules
   (package
     (name "julia-chainrules")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60793; Package guix-patches. (Mon, 30 Jan 2023 11:13:03 GMT) Full text and rfc822 format available.

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

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: 60793 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>, efraim <at> flashner.co.il
Subject: [PATCH v2 3/3] gnu: Add julia-fitsio.
Date: Mon, 30 Jan 2023 12:12:11 +0100
From: Sharlatan Hellseher <sharlatanus <at> gmail.com>

* gnu/packages/julia-xyz.scm (julia-fitsio): New variable.
---
 gnu/packages/julia-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 8c7f0f70cf..ffc600f7f8 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2021, 2022 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2127,6 +2128,31 @@ (define-public julia-finitedifferences
 using finite difference.")
     (license license:expat)))
 
+(define-public julia-fitsio
+  (package
+    (name "julia-fitsio")
+    (version "0.17.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaAstro/FITSIO.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "10w7cdb2cvcwpkcfdz2fwl4ji5rfdv8w9msc9gfd8d34k58bk8c5"))))
+    (build-system julia-build-system)
+    (native-inputs
+     (list julia-aqua julia-orderedcollections))
+    (propagated-inputs
+     (list julia-cfitsio julia-reexport julia-tables))
+    (home-page "https://github.com/JuliaAstro/CFITSIO.jl")
+    (synopsis "Astronomical FITS file support for Julia")
+    (description "This package provides Julia implementation for reading and
+writing @acronym{FITS, Flexible Image Transport System} files, based on the
+@code{cfitsio} library.")
+    (license license:expat)))
+
 (define-public julia-fixedpointnumbers
   (let ((commit "59ee94b93f2f1ee75544ef44187fc0e440cd8015")
         (revision "1"))
-- 
2.38.1





Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Wed, 08 Feb 2023 10:14:02 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Wed, 08 Feb 2023 10:14:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: 60793-done <at> debbugs.gnu.org, Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: Re: [PATCH v2 1/3] gnu: Add julia-cfitsio-jll.
Date: Wed, 8 Feb 2023 12:13:17 +0200
[Message part 1 (text/plain, inline)]
Thanks! Patches pushed. I look forward to more julia astro packages :)

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

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

This bug report was last modified 1 year and 20 days ago.

Previous Next


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