Commit | Line | Data |
---|---|---|
82e4557d JD |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> | |
e13fc379 | 3 | ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
bd5b6ce0 | 4 | ;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
ca310f65 | 5 | ;;; Copyright © 2019 by Amar Singh <nly@disroot.org> |
82e4557d JD |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | (define-module (gnu packages astronomy) | |
23 | #:use-module (guix packages) | |
c9bd15c1 | 24 | #:use-module ((guix licenses) #:prefix license:) |
82e4557d | 25 | #:use-module (guix download) |
ca310f65 | 26 | #:use-module (guix git-download) |
0e8054e8 | 27 | #:use-module (guix utils) |
bd5b6ce0 | 28 | #:use-module (gnu packages autotools) |
c9bd15c1 | 29 | #:use-module (gnu packages image) |
0558e968 JD |
30 | #:use-module (gnu packages compression) |
31 | #:use-module (gnu packages gettext) | |
ca310f65 AS |
32 | #:use-module (gnu packages version-control) |
33 | #:use-module (gnu packages pkg-config) | |
34 | #:use-module (gnu packages xiph) | |
35 | #:use-module (gnu packages pretty-print) | |
36 | #:use-module (gnu packages algebra) | |
37 | #:use-module (gnu packages lua) | |
0558e968 JD |
38 | #:use-module (gnu packages perl) |
39 | #:use-module (gnu packages gl) | |
40 | #:use-module (gnu packages qt) | |
67d24b15 AS |
41 | #:use-module (gnu packages gtk) |
42 | #:use-module (gnu packages gnome) | |
c9bd15c1 | 43 | #:use-module (gnu packages maths) |
0558e968 | 44 | #:use-module (guix build-system cmake) |
67d24b15 AS |
45 | #:use-module (guix build-system gnu) |
46 | #:use-module (srfi srfi-1)) | |
82e4557d JD |
47 | |
48 | (define-public cfitsio | |
49 | (package | |
50 | (name "cfitsio") | |
c3c9716e | 51 | (version "3.47") |
82e4557d JD |
52 | (source |
53 | (origin | |
54 | (method url-fetch) | |
55 | (uri (string-append | |
0e8054e8 | 56 | "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/" |
c3c9716e | 57 | name "-" version ".tar.gz")) |
82e4557d | 58 | (sha256 |
c3c9716e | 59 | (base32 "1vzlxnrjckz78p2wf148v2z3krkwnykfqvlj42sz3q711vqid1a1")))) |
82e4557d | 60 | (build-system gnu-build-system) |
0e8054e8 TGR |
61 | ;; XXX Building with curl currently breaks wcslib. It doesn't use |
62 | ;; pkg-config and hence won't link with -lcurl. | |
82e4557d JD |
63 | (arguments |
64 | `(#:tests? #f ; no tests | |
65 | #:phases | |
66 | (modify-phases %standard-phases | |
67 | (add-after 'unpack 'patch-paths | |
68 | (lambda _ | |
39fb6295 JD |
69 | (substitute* "Makefile.in" (("/bin/") "")) |
70 | #t))))) | |
b8181163 | 71 | (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html") |
82e4557d JD |
72 | (synopsis "Library for reading and writing FITS files") |
73 | (description "CFITSIO provides simple high-level routines for reading and | |
d5d087ab | 74 | writing @dfn{FITS} (Flexible Image Transport System) files that insulate the |
82e4557d JD |
75 | programmer from the internal complexities of the FITS format. CFITSIO also |
76 | provides many advanced features for manipulating and filtering the information | |
77 | in FITS files.") | |
78 | (license (license:non-copyleft "file://License.txt" | |
79 | "See License.txt in the distribution.")))) | |
2be83f6e JD |
80 | |
81 | (define-public wcslib | |
82 | (package | |
83 | (name "wcslib") | |
f781251b | 84 | (version "6.4") |
2be83f6e JD |
85 | (source |
86 | (origin | |
87 | (method url-fetch) | |
88 | (uri (string-append | |
f781251b | 89 | "ftp://ftp.atnf.csiro.au/pub/software/wcslib/wcslib-" version |
39fb6295 | 90 | ".tar.bz2")) |
2be83f6e | 91 | (sha256 |
f781251b | 92 | (base32 "003h23m6d5wcs29v2vbnl63f3z35k5x70lpsqlz5c9bp1bvizh8k")))) |
2be83f6e JD |
93 | (inputs |
94 | `(("cfitsio" ,cfitsio))) | |
95 | (build-system gnu-build-system) | |
96 | (arguments | |
2516ba81 TGR |
97 | `(#:configure-flags |
98 | (list (string-append "--with-cfitsiolib=" | |
99 | (assoc-ref %build-inputs "cfitsio") "/lib") | |
100 | (string-append "--with-cfitsioinc=" | |
101 | (assoc-ref %build-inputs "cfitsio") "/include")) | |
102 | #:phases | |
60b0c252 TGR |
103 | (modify-phases %standard-phases |
104 | (add-before 'configure 'patch-/bin/sh | |
105 | (lambda _ | |
106 | (substitute* "makedefs.in" | |
107 | (("/bin/sh") "sh")) | |
108 | #t)) | |
109 | (delete 'install-license-files)) ; installed by ‘make install’ | |
ccfac015 | 110 | ;; Parallel execution of the test suite is not supported. |
60b0c252 | 111 | #:parallel-tests? #f)) |
d4442eaf | 112 | (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS") |
a7074f47 | 113 | (synopsis "Library which implements the FITS WCS standard") |
1cfd7eaf TGR |
114 | (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard |
115 | defines keywords and usage that provide for the description of astronomical | |
116 | coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image | |
117 | header.") | |
2be83f6e | 118 | (license license:lgpl3+))) |
c9bd15c1 JD |
119 | |
120 | (define-public gnuastro | |
121 | (package | |
122 | (name "gnuastro") | |
b392de0c | 123 | (version "0.11") |
c9bd15c1 JD |
124 | (source |
125 | (origin | |
126 | (method url-fetch) | |
127 | (uri (string-append "mirror://gnu/gnuastro/gnuastro-" | |
38a3b666 | 128 | version ".tar.lz")) |
c9bd15c1 JD |
129 | (sha256 |
130 | (base32 | |
b392de0c | 131 | "0c1yc2qb7vrqad96savfn06rn01izlfz0va738signv93qqj5k3v")))) |
c9bd15c1 JD |
132 | (inputs |
133 | `(("cfitsio" ,cfitsio) | |
134 | ("gsl" ,gsl) | |
09c9fe4a | 135 | ("libjpeg" ,libjpeg) |
edf07598 TGR |
136 | ("libtiff" ,libtiff) |
137 | ("wcslib" ,wcslib) | |
138 | ("zlib" ,zlib))) | |
38a3b666 | 139 | (native-inputs |
bd5b6ce0 EF |
140 | `(("libtool" ,libtool) |
141 | ("lzip" ,lzip))) | |
c9bd15c1 | 142 | (build-system gnu-build-system) |
6fd52309 | 143 | (home-page "https://www.gnu.org/software/gnuastro/") |
ea4678a4 | 144 | (synopsis "Astronomy utilities") |
c9bd15c1 JD |
145 | (description "The GNU Astronomy Utilities (Gnuastro) is a suite of |
146 | programs for the manipulation and analysis of astronomical data.") | |
147 | (license license:gpl3+))) | |
0558e968 JD |
148 | |
149 | (define-public stellarium | |
150 | (package | |
151 | (name "stellarium") | |
e13fc379 | 152 | (version "0.19.3") |
a5883d1f TGR |
153 | (source |
154 | (origin | |
155 | (method url-fetch) | |
156 | (uri (string-append "https://github.com/Stellarium/stellarium" | |
157 | "/releases/download/v" version | |
158 | "/stellarium-" version ".tar.gz")) | |
159 | (sha256 | |
e13fc379 | 160 | (base32 "0p92rgclag0nkic9gk3p9vclb8xx9hv4zlgyij6cyh43s7c1avhp")))) |
0558e968 | 161 | (build-system cmake-build-system) |
6b2afac9 | 162 | (inputs |
5bbf31cc | 163 | `(("qtbase" ,qtbase) |
b74e2f61 | 164 | ("qtlocation" ,qtlocation) |
5bbf31cc DM |
165 | ("qtmultimedia" ,qtmultimedia) |
166 | ("qtscript" ,qtscript) | |
167 | ("qtserialport" ,qtserialport) | |
6b2afac9 DM |
168 | ("zlib" ,zlib))) |
169 | (native-inputs | |
4b93bc0d TGR |
170 | `(("gettext" ,gettext-minimal) ; xgettext is used at compile time |
171 | ("perl" ,perl) ; For pod2man | |
172 | ("qtbase" ,qtbase) ; Qt MOC is needed at compile time | |
5bbf31cc | 173 | ("qttools" ,qttools))) |
f1021afb | 174 | (arguments |
6885745d KK |
175 | `(#:test-target "test" |
176 | #:configure-flags (list "-DENABLE_TESTING=1" | |
177 | (string-append | |
178 | "-DCMAKE_CXX_FLAGS=-isystem " | |
179 | (assoc-ref %build-inputs "qtserialport") | |
180 | "/include/qt5")) | |
181 | #:phases (modify-phases %standard-phases | |
182 | (add-before 'check 'set-offscreen-display | |
183 | (lambda _ | |
184 | ;; make Qt render "offscreen", required for tests | |
185 | (setenv "QT_QPA_PLATFORM" "offscreen") | |
186 | (setenv "HOME" "/tmp") | |
187 | #t))))) | |
3d9f26a0 | 188 | (home-page "https://stellarium.org/") |
f1021afb JD |
189 | (synopsis "3D sky viewer") |
190 | (description "Stellarium is a planetarium. It shows a realistic sky in | |
191 | 3D, just like what you see with the naked eye, binoculars, or a telescope. It | |
192 | can be used to control telescopes over a serial port for tracking celestial | |
193 | objects.") | |
0558e968 | 194 | (license license:gpl2+))) |
ca310f65 AS |
195 | |
196 | (define-public celestia | |
197 | (let ((commit "9dbdf29c4ac3d20afb2d9a80d3dff241ecf81dce")) | |
198 | (package | |
199 | (name "celestia") | |
200 | (version (git-version "1.6.1" "815" commit)) | |
201 | (source (origin | |
202 | (method git-fetch) | |
203 | (uri (git-reference | |
204 | (url "https://github.com/celestiaproject/celestia") | |
205 | (commit commit))) | |
206 | (file-name (git-file-name name version)) | |
207 | (sha256 | |
208 | (base32 | |
209 | "00xibg87l1arzifakgj7s828x9pszcgx7x7ij88a561ig49ryh78")))) | |
210 | (build-system cmake-build-system) | |
211 | (native-inputs | |
212 | `(("perl" ,perl) | |
213 | ("libgit2" ,libgit2) | |
214 | ("pkg-config" ,pkg-config) | |
215 | ("libtool" ,libtool) | |
216 | ("gettext" ,gettext-minimal))) | |
217 | (inputs | |
218 | `(("glu" ,glu) | |
219 | ("glew" ,glew) | |
220 | ("libtheora" ,libtheora) | |
221 | ("libjpeg" ,libjpeg) | |
222 | ("libpng" ,libpng) | |
223 | ;; maybe required? | |
224 | ("mesa" ,mesa) | |
225 | ;; optional: fmtlib, Eigen3; | |
226 | ("fmt" ,fmt) | |
227 | ("eigen" ,eigen) | |
228 | ;; glut: for glut interface | |
229 | ("freeglut" ,freeglut))) | |
230 | (propagated-inputs | |
231 | `(("lua" ,lua))) | |
232 | (arguments | |
233 | `(#:configure-flags '("-DENABLE_GLUT=ON" "-DENABLE_QT=OFF") | |
234 | #:tests? #f)) ;no tests | |
235 | (home-page "https://celestia.space/") | |
236 | (synopsis "Real-time 3D visualization of space") | |
237 | (description | |
238 | "This simulation program lets you explore our universe in three | |
239 | dimensions. Celestia simulates many different types of celestial objects. | |
240 | From planets and moons to star clusters and galaxies, you can visit every | |
241 | object in the expandable database and view it from any point in space and | |
242 | time. The position and movement of solar system objects is calculated | |
243 | accurately in real time at any rate desired.") | |
244 | (license license:gpl2+)))) | |
67d24b15 AS |
245 | |
246 | (define-public celestia-gtk | |
247 | (package | |
248 | (inherit celestia) | |
249 | (name "celestia-gtk") | |
250 | (inputs | |
251 | (append (alist-delete "freeglut" (package-inputs celestia)) | |
252 | `(("gtk2" ,gtk+-2) | |
253 | ("gtkglext" ,gtkglext)))) | |
254 | (arguments | |
255 | `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF") | |
256 | #:tests? #f)))) | |
62470a01 EF |
257 | |
258 | (define-public libnova | |
259 | (package | |
260 | (name "libnova") | |
261 | (version "0.16") | |
262 | (source | |
263 | (origin | |
264 | (method git-fetch) | |
265 | (uri (git-reference | |
266 | (url "https://git.code.sf.net/p/libnova/libnova.git") | |
267 | (commit (string-append "v" version)))) | |
268 | (file-name (git-file-name name version)) | |
269 | (sha256 | |
270 | (base32 | |
271 | "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b")))) | |
272 | (build-system gnu-build-system) | |
273 | (arguments | |
274 | `(#:phases | |
275 | (modify-phases %standard-phases | |
276 | (add-after 'unpack 'patch-git-version | |
277 | (lambda _ | |
278 | (substitute* "./git-version-gen" | |
279 | (("/bin/sh") (which "sh"))) | |
280 | #t))))) | |
281 | (native-inputs | |
282 | `(("autoconf" ,autoconf) | |
283 | ("automake" ,automake) | |
284 | ("libtool" ,libtool))) | |
285 | (synopsis "Celestial mechanics, astrometry and astrodynamics library") | |
286 | (description "Libnova is a general purpose, double precision, Celestial | |
287 | Mechanics, Astrometry and Astrodynamics library.") | |
288 | (home-page "http://libnova.sourceforge.net/") | |
289 | (license (list license:lgpl2.0+ | |
290 | license:gpl2+)))) ; examples/transforms.c & lntest/*.c | |
291 |