Commit | Line | Data |
---|---|---|
82e4557d JD |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> | |
ed8ac552 | 3 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
bd5b6ce0 | 4 | ;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
82e4557d JD |
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/>. | |
20 | ||
21 | (define-module (gnu packages astronomy) | |
22 | #:use-module (guix packages) | |
c9bd15c1 | 23 | #:use-module ((guix licenses) #:prefix license:) |
82e4557d | 24 | #:use-module (guix download) |
0e8054e8 | 25 | #:use-module (guix utils) |
bd5b6ce0 | 26 | #:use-module (gnu packages autotools) |
c9bd15c1 | 27 | #:use-module (gnu packages image) |
0558e968 JD |
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) | |
c9bd15c1 | 33 | #:use-module (gnu packages maths) |
0558e968 | 34 | #:use-module (guix build-system cmake) |
82e4557d JD |
35 | #:use-module (guix build-system gnu)) |
36 | ||
37 | (define-public cfitsio | |
38 | (package | |
39 | (name "cfitsio") | |
115af78e | 40 | (version "3.450") |
82e4557d JD |
41 | (source |
42 | (origin | |
43 | (method url-fetch) | |
44 | (uri (string-append | |
0e8054e8 TGR |
45 | "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/" |
46 | name (string-replace-substring version "." "") ".tar.gz")) | |
82e4557d | 47 | (sha256 |
115af78e | 48 | (base32 "0bmrkw6w65zb0k3mszaaqy1f4zjm2hl7njww74nb5v38wvdi4q5z")))) |
82e4557d | 49 | (build-system gnu-build-system) |
0e8054e8 TGR |
50 | ;; XXX Building with curl currently breaks wcslib. It doesn't use |
51 | ;; pkg-config and hence won't link with -lcurl. | |
82e4557d JD |
52 | (arguments |
53 | `(#:tests? #f ; no tests | |
54 | #:phases | |
55 | (modify-phases %standard-phases | |
56 | (add-after 'unpack 'patch-paths | |
57 | (lambda _ | |
39fb6295 JD |
58 | (substitute* "Makefile.in" (("/bin/") "")) |
59 | #t))))) | |
b8181163 | 60 | (home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html") |
82e4557d JD |
61 | (synopsis "Library for reading and writing FITS files") |
62 | (description "CFITSIO provides simple high-level routines for reading and | |
d5d087ab | 63 | writing @dfn{FITS} (Flexible Image Transport System) files that insulate the |
82e4557d JD |
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.")))) | |
2be83f6e JD |
69 | |
70 | (define-public wcslib | |
71 | (package | |
72 | (name "wcslib") | |
ccfac015 | 73 | (version "5.20") |
2be83f6e JD |
74 | (source |
75 | (origin | |
76 | (method url-fetch) | |
77 | (uri (string-append | |
39fb6295 JD |
78 | "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version |
79 | ".tar.bz2")) | |
2be83f6e | 80 | (sha256 |
ccfac015 | 81 | (base32 "1c8g9kv4dxrnawnqi4spi2p10s2xs7x75pdfxhbqxgcc97dkgh0b")))) |
2be83f6e JD |
82 | (inputs |
83 | `(("cfitsio" ,cfitsio))) | |
84 | (build-system gnu-build-system) | |
85 | (arguments | |
60b0c252 TGR |
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’ | |
ccfac015 | 94 | ;; Parallel execution of the test suite is not supported. |
60b0c252 | 95 | #:parallel-tests? #f)) |
d4442eaf | 96 | (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS") |
a7074f47 | 97 | (synopsis "Library which implements the FITS WCS standard") |
1cfd7eaf TGR |
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.") | |
2be83f6e | 102 | (license license:lgpl3+))) |
c9bd15c1 JD |
103 | |
104 | (define-public gnuastro | |
105 | (package | |
106 | (name "gnuastro") | |
bd5b6ce0 | 107 | (version "0.9") |
c9bd15c1 JD |
108 | (source |
109 | (origin | |
110 | (method url-fetch) | |
111 | (uri (string-append "mirror://gnu/gnuastro/gnuastro-" | |
38a3b666 | 112 | version ".tar.lz")) |
c9bd15c1 JD |
113 | (sha256 |
114 | (base32 | |
bd5b6ce0 | 115 | "1c1894ixz3l8p1nmzkysgl9lz8vpqbfw1dd404kh6lvrpml7jzig")))) |
c9bd15c1 JD |
116 | (inputs |
117 | `(("cfitsio" ,cfitsio) | |
118 | ("gsl" ,gsl) | |
09c9fe4a | 119 | ("libjpeg" ,libjpeg) |
edf07598 TGR |
120 | ("libtiff" ,libtiff) |
121 | ("wcslib" ,wcslib) | |
122 | ("zlib" ,zlib))) | |
38a3b666 | 123 | (native-inputs |
bd5b6ce0 EF |
124 | `(("libtool" ,libtool) |
125 | ("lzip" ,lzip))) | |
c9bd15c1 | 126 | (build-system gnu-build-system) |
6fd52309 | 127 | (home-page "https://www.gnu.org/software/gnuastro/") |
ea4678a4 | 128 | (synopsis "Astronomy utilities") |
c9bd15c1 JD |
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+))) | |
0558e968 JD |
132 | |
133 | (define-public stellarium | |
134 | (package | |
135 | (name "stellarium") | |
47131ebb | 136 | (version "0.19.0") |
f1021afb JD |
137 | (source (origin |
138 | (method url-fetch) | |
6885745d KK |
139 | (uri (string-append "https://github.com/Stellarium/" name |
140 | "/releases/download/v" version | |
141 | "/" name "-" version ".tar.gz")) | |
f1021afb JD |
142 | (sha256 |
143 | (base32 | |
47131ebb | 144 | "1mjjqcpgm5a1022x0mpqj3v6qkvpm9wqm1hqyg0mlypc5681va8a")))) |
0558e968 | 145 | (build-system cmake-build-system) |
6b2afac9 | 146 | (inputs |
5bbf31cc | 147 | `(("qtbase" ,qtbase) |
b74e2f61 | 148 | ("qtlocation" ,qtlocation) |
5bbf31cc DM |
149 | ("qtmultimedia" ,qtmultimedia) |
150 | ("qtscript" ,qtscript) | |
151 | ("qtserialport" ,qtserialport) | |
6b2afac9 DM |
152 | ("zlib" ,zlib))) |
153 | (native-inputs | |
154 | `(("gettext" ,gettext-minimal) ; xgettext is used at compile time | |
5bbf31cc DM |
155 | ("perl" ,perl) ; For pod2man |
156 | ("qtbase" ,qtbase) ; Qt MOC is needed at compile time | |
157 | ("qttools" ,qttools))) | |
f1021afb | 158 | (arguments |
6885745d KK |
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))))) | |
3d9f26a0 | 172 | (home-page "https://stellarium.org/") |
f1021afb JD |
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.") | |
0558e968 | 178 | (license license:gpl2+))) |