linux-container: Do not add %CONTAINER-FILE-SYSTEMS to Docker image OSes.
[guix.git] / gnu / packages / astronomy.scm
blobab5dcd92a7da2740cf6bc5bb7853926cb1f0f487
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages astronomy)
22   #:use-module (guix packages)
23   #:use-module ((guix licenses) #:prefix license:)
24   #:use-module (guix download)
25   #:use-module (guix utils)
26   #:use-module (gnu packages autotools)
27   #:use-module (gnu packages image)
28   #:use-module (gnu packages compression)
29   #:use-module (gnu packages gettext)
30   #:use-module (gnu packages perl)
31   #:use-module (gnu packages gl)
32   #:use-module (gnu packages qt)
33   #:use-module (gnu packages maths)
34   #:use-module (guix build-system cmake)
35   #:use-module (guix build-system gnu))
37 (define-public cfitsio
38   (package
39     (name "cfitsio")
40     (version "3.450")
41     (source
42      (origin
43        (method url-fetch)
44        (uri (string-append
45              "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
46              name (string-replace-substring version "." "") ".tar.gz"))
47        (sha256
48         (base32 "0bmrkw6w65zb0k3mszaaqy1f4zjm2hl7njww74nb5v38wvdi4q5z"))))
49     (build-system gnu-build-system)
50     ;; XXX Building with curl currently breaks wcslib.  It doesn't use
51     ;; pkg-config and hence won't link with -lcurl.
52     (arguments
53      `(#:tests? #f ; no tests
54        #:phases
55        (modify-phases %standard-phases
56          (add-after 'unpack 'patch-paths
57            (lambda _
58              (substitute* "Makefile.in" (("/bin/") ""))
59              #t)))))
60     (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
61     (synopsis "Library for reading and writing FITS files")
62     (description "CFITSIO provides simple high-level routines for reading and
63 writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
64 programmer from the internal complexities of the FITS format. CFITSIO also
65 provides many advanced features for manipulating and filtering the information
66 in FITS files.")
67     (license (license:non-copyleft "file://License.txt"
68                           "See License.txt in the distribution."))))
70 (define-public wcslib
71   (package
72     (name "wcslib")
73     (version "5.20")
74     (source
75      (origin
76        (method url-fetch)
77        (uri (string-append
78              "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
79              ".tar.bz2"))
80        (sha256
81         (base32 "1c8g9kv4dxrnawnqi4spi2p10s2xs7x75pdfxhbqxgcc97dkgh0b"))))
82     (inputs
83      `(("cfitsio" ,cfitsio)))
84     (build-system gnu-build-system)
85     (arguments
86      `(#:phases
87        (modify-phases %standard-phases
88          (add-before 'configure 'patch-/bin/sh
89            (lambda _
90              (substitute* "makedefs.in"
91                (("/bin/sh") "sh"))
92              #t))
93          (delete 'install-license-files)) ; installed by ‘make install’
94        ;; Parallel execution of the test suite is not supported.
95        #:parallel-tests? #f))
96     (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
97     (synopsis "Library which implements the FITS WCS standard")
98     (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
99 defines keywords and usage that provide for the description of astronomical
100 coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
101 header.")
102     (license license:lgpl3+)))
104 (define-public gnuastro
105   (package
106     (name "gnuastro")
107     (version "0.9")
108     (source
109      (origin
110        (method url-fetch)
111        (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
112                            version ".tar.lz"))
113        (sha256
114         (base32
115          "1c1894ixz3l8p1nmzkysgl9lz8vpqbfw1dd404kh6lvrpml7jzig"))))
116     (inputs
117      `(("cfitsio" ,cfitsio)
118        ("gsl" ,gsl)
119        ("libjpeg" ,libjpeg)
120        ("libtiff" ,libtiff)
121        ("wcslib" ,wcslib)
122        ("zlib" ,zlib)))
123     (native-inputs
124      `(("libtool" ,libtool)
125        ("lzip" ,lzip)))
126     (build-system gnu-build-system)
127     (home-page "https://www.gnu.org/software/gnuastro/")
128     (synopsis "Astronomy utilities")
129     (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
130 programs for the manipulation and analysis of astronomical data.")
131     (license license:gpl3+)))
133 (define-public stellarium
134   (package
135     (name "stellarium")
136     (version "0.19.0")
137     (source (origin
138              (method url-fetch)
139              (uri (string-append "https://github.com/Stellarium/" name
140                                  "/releases/download/v" version
141                                  "/" name "-" version ".tar.gz"))
142              (sha256
143               (base32
144                "1mjjqcpgm5a1022x0mpqj3v6qkvpm9wqm1hqyg0mlypc5681va8a"))))
145     (build-system cmake-build-system)
146     (inputs
147      `(("qtbase" ,qtbase)
148        ("qtlocation" ,qtlocation)
149        ("qtmultimedia" ,qtmultimedia)
150        ("qtscript" ,qtscript)
151        ("qtserialport" ,qtserialport)
152        ("zlib" ,zlib)))
153     (native-inputs
154      `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
155        ("perl" ,perl) ; For pod2man
156        ("qtbase" ,qtbase) ; Qt MOC is needed at compile time
157        ("qttools" ,qttools)))
158     (arguments
159      `(#:test-target "test"
160        #:configure-flags (list "-DENABLE_TESTING=1"
161                                (string-append
162                                 "-DCMAKE_CXX_FLAGS=-isystem "
163                                 (assoc-ref %build-inputs "qtserialport")
164                                 "/include/qt5"))
165        #:phases (modify-phases %standard-phases
166                   (add-before 'check 'set-offscreen-display
167                     (lambda _
168                       ;; make Qt render "offscreen", required for tests
169                       (setenv "QT_QPA_PLATFORM" "offscreen")
170                       (setenv "HOME" "/tmp")
171                       #t)))))
172     (home-page "https://stellarium.org/")
173     (synopsis "3D sky viewer")
174     (description "Stellarium is a planetarium.  It shows a realistic sky in
175 3D, just like what you see with the naked eye, binoculars, or a telescope.  It
176 can be used to control telescopes over a serial port for tracking celestial
177 objects.")
178     (license license:gpl2+)))