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>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages astronomy)
21 #:use-module (guix packages)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix download)
24 #:use-module (guix utils)
25 #:use-module (gnu packages image)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages gettext)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages gl)
30 #:use-module (gnu packages qt)
31 #:use-module (gnu packages maths)
32 #:use-module (guix build-system cmake)
33 #:use-module (guix build-system gnu))
35 (define-public cfitsio
43 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
44 name (string-replace-substring version "." "") ".tar.gz"))
46 (base32 "1f0nmki45h9kw7vxpxiav9cb6vs3qqi6zrp2lpci5yhqc5isl43c"))))
47 (build-system gnu-build-system)
48 ;; XXX Building with curl currently breaks wcslib. It doesn't use
49 ;; pkg-config and hence won't link with -lcurl.
51 `(#:tests? #f ; no tests
53 (modify-phases %standard-phases
54 (add-after 'unpack 'patch-paths
56 (substitute* "Makefile.in" (("/bin/") ""))
58 (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
59 (synopsis "Library for reading and writing FITS files")
60 (description "CFITSIO provides simple high-level routines for reading and
61 writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
62 programmer from the internal complexities of the FITS format. CFITSIO also
63 provides many advanced features for manipulating and filtering the information
65 (license (license:non-copyleft "file://License.txt"
66 "See License.txt in the distribution."))))
76 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
79 (base32 "16jh568k99c9p0y3qzcgps2rii933x9wlay7q1xm0lr59zqzp4xn"))))
81 `(("cfitsio" ,cfitsio)))
82 (build-system gnu-build-system)
84 `(#:phases (modify-phases %standard-phases
85 (add-before 'configure 'patch-/bin/sh
87 (substitute* "makedefs.in"
90 (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
91 (synopsis "Library which implements the FITS WCS standard")
92 (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
93 defines keywords and usage that provide for the description of astronomical
94 coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
96 (license license:lgpl3+)))
98 (define-public gnuastro
105 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
109 "10lxzxyrf30hj3bqdgprvaj9phzdi816khjmr0vmjf8pmsr8bqqr"))))
111 `(("cfitsio" ,cfitsio)
115 (build-system gnu-build-system)
116 (home-page "https://www.gnu.org/software/gnuastro/")
117 (synopsis "Astronomy utilities")
118 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
119 programs for the manipulation and analysis of astronomical data.")
120 (license license:gpl3+)))
122 (define-public stellarium
128 (uri (string-append "https://github.com/Stellarium/" name
129 "/releases/download/v" version
130 "/" name "-" version ".tar.gz"))
131 (file-name (string-append name "-" version ".tar.gz"))
134 "0d6b3fs5aify7i1lwgkcickppnj73cbh24g8qschnfs3ypdf48fc"))))
135 (build-system cmake-build-system)
138 ("qtlocation" ,qtlocation)
139 ("qtmultimedia" ,qtmultimedia)
140 ("qtscript" ,qtscript)
141 ("qtserialport" ,qtserialport)
144 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
145 ("perl" ,perl) ; For pod2man
146 ("qtbase" ,qtbase) ; Qt MOC is needed at compile time
147 ("qttools" ,qttools)))
149 `(#:test-target "test"
150 #:configure-flags (list "-DENABLE_TESTING=1"
152 "-DCMAKE_CXX_FLAGS=-isystem "
153 (assoc-ref %build-inputs "qtserialport")
155 #:phases (modify-phases %standard-phases
156 (add-before 'check 'set-offscreen-display
158 ;; make Qt render "offscreen", required for tests
159 (setenv "QT_QPA_PLATFORM" "offscreen")
160 (setenv "HOME" "/tmp")
162 (home-page "http://www.stellarium.org/")
163 (synopsis "3D sky viewer")
164 (description "Stellarium is a planetarium. It shows a realistic sky in
165 3D, just like what you see with the naked eye, binoculars, or a telescope. It
166 can be used to control telescopes over a serial port for tracking celestial
168 (license license:gpl2+)))