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>
6 ;;; This file is part of GNU Guix.
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.
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.
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
45 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
46 name (string-replace-substring version "." "") ".tar.gz"))
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.
53 `(#:tests? #f ; no tests
55 (modify-phases %standard-phases
56 (add-after 'unpack 'patch-paths
58 (substitute* "Makefile.in" (("/bin/") ""))
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
67 (license (license:non-copyleft "file://License.txt"
68 "See License.txt in the distribution."))))
78 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
81 (base32 "1c8g9kv4dxrnawnqi4spi2p10s2xs7x75pdfxhbqxgcc97dkgh0b"))))
83 `(("cfitsio" ,cfitsio)))
84 (build-system gnu-build-system)
87 (modify-phases %standard-phases
88 (add-before 'configure 'patch-/bin/sh
90 (substitute* "makedefs.in"
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
102 (license license:lgpl3+)))
104 (define-public gnuastro
111 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
115 "1c1894ixz3l8p1nmzkysgl9lz8vpqbfw1dd404kh6lvrpml7jzig"))))
117 `(("cfitsio" ,cfitsio)
124 `(("libtool" ,libtool)
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
139 (uri (string-append "https://github.com/Stellarium/" name
140 "/releases/download/v" version
141 "/" name "-" version ".tar.gz"))
144 "1mjjqcpgm5a1022x0mpqj3v6qkvpm9wqm1hqyg0mlypc5681va8a"))))
145 (build-system cmake-build-system)
148 ("qtlocation" ,qtlocation)
149 ("qtmultimedia" ,qtmultimedia)
150 ("qtscript" ,qtscript)
151 ("qtserialport" ,qtserialport)
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)))
159 `(#:test-target "test"
160 #:configure-flags (list "-DENABLE_TESTING=1"
162 "-DCMAKE_CXX_FLAGS=-isystem "
163 (assoc-ref %build-inputs "qtserialport")
165 #:phases (modify-phases %standard-phases
166 (add-before 'check 'set-offscreen-display
168 ;; make Qt render "offscreen", required for tests
169 (setenv "QT_QPA_PLATFORM" "offscreen")
170 (setenv "HOME" "/tmp")
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
178 (license license:gpl2+)))