Commit | Line | Data |
---|---|---|
82e4557d JD |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> | |
c3c9716e | 3 | ;;; Copyright © 2018, 2019 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") | |
ccfac015 | 84 | (version "5.20") |
2be83f6e JD |
85 | (source |
86 | (origin | |
87 | (method url-fetch) | |
88 | (uri (string-append | |
39fb6295 JD |
89 | "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version |
90 | ".tar.bz2")) | |
2be83f6e | 91 | (sha256 |
ccfac015 | 92 | (base32 "1c8g9kv4dxrnawnqi4spi2p10s2xs7x75pdfxhbqxgcc97dkgh0b")))) |
2be83f6e JD |
93 | (inputs |
94 | `(("cfitsio" ,cfitsio))) | |
95 | (build-system gnu-build-system) | |
96 | (arguments | |
60b0c252 TGR |
97 | `(#:phases |
98 | (modify-phases %standard-phases | |
99 | (add-before 'configure 'patch-/bin/sh | |
100 | (lambda _ | |
101 | (substitute* "makedefs.in" | |
102 | (("/bin/sh") "sh")) | |
103 | #t)) | |
104 | (delete 'install-license-files)) ; installed by ‘make install’ | |
ccfac015 | 105 | ;; Parallel execution of the test suite is not supported. |
60b0c252 | 106 | #:parallel-tests? #f)) |
d4442eaf | 107 | (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS") |
a7074f47 | 108 | (synopsis "Library which implements the FITS WCS standard") |
1cfd7eaf TGR |
109 | (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard |
110 | defines keywords and usage that provide for the description of astronomical | |
111 | coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image | |
112 | header.") | |
2be83f6e | 113 | (license license:lgpl3+))) |
c9bd15c1 JD |
114 | |
115 | (define-public gnuastro | |
116 | (package | |
117 | (name "gnuastro") | |
bd5b6ce0 | 118 | (version "0.9") |
c9bd15c1 JD |
119 | (source |
120 | (origin | |
121 | (method url-fetch) | |
122 | (uri (string-append "mirror://gnu/gnuastro/gnuastro-" | |
38a3b666 | 123 | version ".tar.lz")) |
c9bd15c1 JD |
124 | (sha256 |
125 | (base32 | |
bd5b6ce0 | 126 | "1c1894ixz3l8p1nmzkysgl9lz8vpqbfw1dd404kh6lvrpml7jzig")))) |
c9bd15c1 JD |
127 | (inputs |
128 | `(("cfitsio" ,cfitsio) | |
129 | ("gsl" ,gsl) | |
09c9fe4a | 130 | ("libjpeg" ,libjpeg) |
edf07598 TGR |
131 | ("libtiff" ,libtiff) |
132 | ("wcslib" ,wcslib) | |
133 | ("zlib" ,zlib))) | |
38a3b666 | 134 | (native-inputs |
bd5b6ce0 EF |
135 | `(("libtool" ,libtool) |
136 | ("lzip" ,lzip))) | |
c9bd15c1 | 137 | (build-system gnu-build-system) |
6fd52309 | 138 | (home-page "https://www.gnu.org/software/gnuastro/") |
ea4678a4 | 139 | (synopsis "Astronomy utilities") |
c9bd15c1 JD |
140 | (description "The GNU Astronomy Utilities (Gnuastro) is a suite of |
141 | programs for the manipulation and analysis of astronomical data.") | |
142 | (license license:gpl3+))) | |
0558e968 JD |
143 | |
144 | (define-public stellarium | |
145 | (package | |
146 | (name "stellarium") | |
4b93bc0d | 147 | (version "0.19.1") |
a5883d1f TGR |
148 | (source |
149 | (origin | |
150 | (method url-fetch) | |
151 | (uri (string-append "https://github.com/Stellarium/stellarium" | |
152 | "/releases/download/v" version | |
153 | "/stellarium-" version ".tar.gz")) | |
154 | (sha256 | |
155 | (base32 "0s7v5iyhah258k83kvy2a91a3mdf34r150lcar4mmdsrrcmas98g")))) | |
0558e968 | 156 | (build-system cmake-build-system) |
6b2afac9 | 157 | (inputs |
5bbf31cc | 158 | `(("qtbase" ,qtbase) |
b74e2f61 | 159 | ("qtlocation" ,qtlocation) |
5bbf31cc DM |
160 | ("qtmultimedia" ,qtmultimedia) |
161 | ("qtscript" ,qtscript) | |
162 | ("qtserialport" ,qtserialport) | |
6b2afac9 DM |
163 | ("zlib" ,zlib))) |
164 | (native-inputs | |
4b93bc0d TGR |
165 | `(("gettext" ,gettext-minimal) ; xgettext is used at compile time |
166 | ("perl" ,perl) ; For pod2man | |
167 | ("qtbase" ,qtbase) ; Qt MOC is needed at compile time | |
5bbf31cc | 168 | ("qttools" ,qttools))) |
f1021afb | 169 | (arguments |
6885745d KK |
170 | `(#:test-target "test" |
171 | #:configure-flags (list "-DENABLE_TESTING=1" | |
172 | (string-append | |
173 | "-DCMAKE_CXX_FLAGS=-isystem " | |
174 | (assoc-ref %build-inputs "qtserialport") | |
175 | "/include/qt5")) | |
176 | #:phases (modify-phases %standard-phases | |
177 | (add-before 'check 'set-offscreen-display | |
178 | (lambda _ | |
179 | ;; make Qt render "offscreen", required for tests | |
180 | (setenv "QT_QPA_PLATFORM" "offscreen") | |
181 | (setenv "HOME" "/tmp") | |
182 | #t))))) | |
3d9f26a0 | 183 | (home-page "https://stellarium.org/") |
f1021afb JD |
184 | (synopsis "3D sky viewer") |
185 | (description "Stellarium is a planetarium. It shows a realistic sky in | |
186 | 3D, just like what you see with the naked eye, binoculars, or a telescope. It | |
187 | can be used to control telescopes over a serial port for tracking celestial | |
188 | objects.") | |
0558e968 | 189 | (license license:gpl2+))) |
ca310f65 AS |
190 | |
191 | (define-public celestia | |
192 | (let ((commit "9dbdf29c4ac3d20afb2d9a80d3dff241ecf81dce")) | |
193 | (package | |
194 | (name "celestia") | |
195 | (version (git-version "1.6.1" "815" commit)) | |
196 | (source (origin | |
197 | (method git-fetch) | |
198 | (uri (git-reference | |
199 | (url "https://github.com/celestiaproject/celestia") | |
200 | (commit commit))) | |
201 | (file-name (git-file-name name version)) | |
202 | (sha256 | |
203 | (base32 | |
204 | "00xibg87l1arzifakgj7s828x9pszcgx7x7ij88a561ig49ryh78")))) | |
205 | (build-system cmake-build-system) | |
206 | (native-inputs | |
207 | `(("perl" ,perl) | |
208 | ("libgit2" ,libgit2) | |
209 | ("pkg-config" ,pkg-config) | |
210 | ("libtool" ,libtool) | |
211 | ("gettext" ,gettext-minimal))) | |
212 | (inputs | |
213 | `(("glu" ,glu) | |
214 | ("glew" ,glew) | |
215 | ("libtheora" ,libtheora) | |
216 | ("libjpeg" ,libjpeg) | |
217 | ("libpng" ,libpng) | |
218 | ;; maybe required? | |
219 | ("mesa" ,mesa) | |
220 | ;; optional: fmtlib, Eigen3; | |
221 | ("fmt" ,fmt) | |
222 | ("eigen" ,eigen) | |
223 | ;; glut: for glut interface | |
224 | ("freeglut" ,freeglut))) | |
225 | (propagated-inputs | |
226 | `(("lua" ,lua))) | |
227 | (arguments | |
228 | `(#:configure-flags '("-DENABLE_GLUT=ON" "-DENABLE_QT=OFF") | |
229 | #:tests? #f)) ;no tests | |
230 | (home-page "https://celestia.space/") | |
231 | (synopsis "Real-time 3D visualization of space") | |
232 | (description | |
233 | "This simulation program lets you explore our universe in three | |
234 | dimensions. Celestia simulates many different types of celestial objects. | |
235 | From planets and moons to star clusters and galaxies, you can visit every | |
236 | object in the expandable database and view it from any point in space and | |
237 | time. The position and movement of solar system objects is calculated | |
238 | accurately in real time at any rate desired.") | |
239 | (license license:gpl2+)))) | |
67d24b15 AS |
240 | |
241 | (define-public celestia-gtk | |
242 | (package | |
243 | (inherit celestia) | |
244 | (name "celestia-gtk") | |
245 | (inputs | |
246 | (append (alist-delete "freeglut" (package-inputs celestia)) | |
247 | `(("gtk2" ,gtk+-2) | |
248 | ("gtkglext" ,gtkglext)))) | |
249 | (arguments | |
250 | `(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF") | |
251 | #:tests? #f)))) |