gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / astronomy.scm
index 59fa11b..a909b46 100644 (file)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages maths)
   #:use-module (guix build-system cmake)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (srfi srfi-1))
 
 (define-public cfitsio
   (package
@@ -78,20 +81,25 @@ in FITS files.")
 (define-public wcslib
   (package
     (name "wcslib")
-    (version "5.20")
+    (version "6.4")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
-             "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
+             "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version
              ".tar.bz2"))
        (sha256
-        (base32 "1c8g9kv4dxrnawnqi4spi2p10s2xs7x75pdfxhbqxgcc97dkgh0b"))))
+        (base32 "003h23m6d5wcs29v2vbnl63f3z35k5x70lpsqlz5c9bp1bvizh8k"))))
     (inputs
      `(("cfitsio" ,cfitsio)))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
+     `(#:configure-flags
+       (list (string-append "--with-cfitsiolib="
+                            (assoc-ref %build-inputs "cfitsio") "/lib")
+             (string-append "--with-cfitsioinc="
+                            (assoc-ref %build-inputs "cfitsio") "/include"))
+       #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'patch-/bin/sh
            (lambda _
@@ -112,7 +120,7 @@ header.")
 (define-public gnuastro
   (package
     (name "gnuastro")
-    (version "0.9")
+    (version "0.11")
     (source
      (origin
        (method url-fetch)
@@ -120,7 +128,7 @@ header.")
                            version ".tar.lz"))
        (sha256
         (base32
-         "1c1894ixz3l8p1nmzkysgl9lz8vpqbfw1dd404kh6lvrpml7jzig"))))
+         "0c1yc2qb7vrqad96savfn06rn01izlfz0va738signv93qqj5k3v"))))
     (inputs
      `(("cfitsio" ,cfitsio)
        ("gsl" ,gsl)
@@ -141,7 +149,7 @@ programs for the manipulation and analysis of astronomical data.")
 (define-public stellarium
   (package
     (name "stellarium")
-    (version "0.19.1")
+    (version "0.19.2")
     (source
      (origin
        (method url-fetch)
@@ -149,7 +157,7 @@ programs for the manipulation and analysis of astronomical data.")
                            "/releases/download/v" version
                            "/stellarium-" version ".tar.gz"))
        (sha256
-        (base32 "0s7v5iyhah258k83kvy2a91a3mdf34r150lcar4mmdsrrcmas98g"))))
+        (base32 "10b05slj5fjakrjb20m68xql68plb64mwn0165dy2fry8z2hbl74"))))
     (build-system cmake-build-system)
     (inputs
      `(("qtbase" ,qtbase)
@@ -234,3 +242,50 @@ object in the expandable database and view it from any point in space and
 time.  The position and movement of solar system objects is calculated
 accurately in real time at any rate desired.")
       (license license:gpl2+))))
+
+(define-public celestia-gtk
+  (package
+    (inherit celestia)
+    (name "celestia-gtk")
+    (inputs
+     (append (alist-delete "freeglut" (package-inputs celestia))
+             `(("gtk2" ,gtk+-2)
+               ("gtkglext" ,gtkglext))))
+    (arguments
+     `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF")
+       #:tests? #f))))
+
+(define-public libnova
+  (package
+    (name "libnova")
+    (version "0.16")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.code.sf.net/p/libnova/libnova.git")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-git-version
+           (lambda _
+             (substitute* "./git-version-gen"
+               (("/bin/sh") (which "sh")))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (synopsis "Celestial mechanics, astrometry and astrodynamics library")
+    (description "Libnova is a general purpose, double precision, Celestial
+Mechanics, Astrometry and Astrodynamics library.")
+    (home-page "http://libnova.sourceforge.net/")
+    (license (list license:lgpl2.0+
+                   license:gpl2+)))) ; examples/transforms.c & lntest/*.c
+