gnu: ethtool: Update to 4.15.
[jackhill/guix/guix.git] / gnu / packages / astronomy.scm
CommitLineData
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>
82e4557d
JD
4;;;
5;;; This file is part of GNU Guix.
6;;;
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.
11;;;
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.
16;;;
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/>.
19
20(define-module (gnu packages astronomy)
21 #:use-module (guix packages)
c9bd15c1 22 #:use-module ((guix licenses) #:prefix license:)
82e4557d 23 #:use-module (guix download)
0e8054e8 24 #:use-module (guix utils)
c9bd15c1 25 #:use-module (gnu packages image)
0558e968
JD
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)
c9bd15c1 31 #:use-module (gnu packages maths)
0558e968 32 #:use-module (guix build-system cmake)
82e4557d
JD
33 #:use-module (guix build-system gnu))
34
35(define-public cfitsio
36 (package
37 (name "cfitsio")
0e8054e8 38 (version "3.420")
82e4557d
JD
39 (source
40 (origin
41 (method url-fetch)
42 (uri (string-append
0e8054e8
TGR
43 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
44 name (string-replace-substring version "." "") ".tar.gz"))
82e4557d 45 (sha256
0e8054e8 46 (base32 "1f0nmki45h9kw7vxpxiav9cb6vs3qqi6zrp2lpci5yhqc5isl43c"))))
82e4557d 47 (build-system gnu-build-system)
0e8054e8
TGR
48 ;; XXX Building with curl currently breaks wcslib. It doesn't use
49 ;; pkg-config and hence won't link with -lcurl.
82e4557d
JD
50 (arguments
51 `(#:tests? #f ; no tests
52 #:phases
53 (modify-phases %standard-phases
54 (add-after 'unpack 'patch-paths
55 (lambda _
39fb6295
JD
56 (substitute* "Makefile.in" (("/bin/") ""))
57 #t)))))
82e4557d
JD
58 (home-page "http://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
d5d087ab 61writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
82e4557d
JD
62programmer from the internal complexities of the FITS format. CFITSIO also
63provides many advanced features for manipulating and filtering the information
64in FITS files.")
65 (license (license:non-copyleft "file://License.txt"
66 "See License.txt in the distribution."))))
2be83f6e
JD
67
68(define-public wcslib
69 (package
70 (name "wcslib")
ed8ac552 71 (version "5.18")
2be83f6e
JD
72 (source
73 (origin
74 (method url-fetch)
75 (uri (string-append
39fb6295
JD
76 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
77 ".tar.bz2"))
2be83f6e 78 (sha256
ed8ac552 79 (base32 "16jh568k99c9p0y3qzcgps2rii933x9wlay7q1xm0lr59zqzp4xn"))))
2be83f6e
JD
80 (inputs
81 `(("cfitsio" ,cfitsio)))
82 (build-system gnu-build-system)
83 (arguments
84 `(#:phases (modify-phases %standard-phases
85 (add-before 'configure 'patch-/bin/sh
86 (lambda _
87 (substitute* "makedefs.in"
39fb6295
JD
88 (("/bin/sh") "sh"))
89 #t)))))
d4442eaf 90 (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
a7074f47 91 (synopsis "Library which implements the FITS WCS standard")
1cfd7eaf
TGR
92 (description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
93defines keywords and usage that provide for the description of astronomical
94coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
95header.")
2be83f6e 96 (license license:lgpl3+)))
c9bd15c1
JD
97
98(define-public gnuastro
99 (package
100 (name "gnuastro")
09c9fe4a 101 (version "0.5")
c9bd15c1
JD
102 (source
103 (origin
104 (method url-fetch)
105 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
106 version ".tar.gz"))
107 (sha256
108 (base32
09c9fe4a 109 "10lxzxyrf30hj3bqdgprvaj9phzdi816khjmr0vmjf8pmsr8bqqr"))))
c9bd15c1
JD
110 (inputs
111 `(("cfitsio" ,cfitsio)
112 ("gsl" ,gsl)
09c9fe4a 113 ("libjpeg" ,libjpeg)
c9bd15c1
JD
114 ("wcslib" ,wcslib)))
115 (build-system gnu-build-system)
6fd52309 116 (home-page "https://www.gnu.org/software/gnuastro/")
ea4678a4 117 (synopsis "Astronomy utilities")
c9bd15c1
JD
118 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
119programs for the manipulation and analysis of astronomical data.")
120 (license license:gpl3+)))
0558e968
JD
121
122(define-public stellarium
123 (package
124 (name "stellarium")
6885745d 125 (version "0.17.0")
f1021afb
JD
126 (source (origin
127 (method url-fetch)
6885745d
KK
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"))
f1021afb
JD
132 (sha256
133 (base32
6885745d 134 "0d6b3fs5aify7i1lwgkcickppnj73cbh24g8qschnfs3ypdf48fc"))))
0558e968 135 (build-system cmake-build-system)
6b2afac9 136 (inputs
5bbf31cc 137 `(("qtbase" ,qtbase)
b74e2f61 138 ("qtlocation" ,qtlocation)
5bbf31cc
DM
139 ("qtmultimedia" ,qtmultimedia)
140 ("qtscript" ,qtscript)
141 ("qtserialport" ,qtserialport)
6b2afac9
DM
142 ("zlib" ,zlib)))
143 (native-inputs
144 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
5bbf31cc
DM
145 ("perl" ,perl) ; For pod2man
146 ("qtbase" ,qtbase) ; Qt MOC is needed at compile time
147 ("qttools" ,qttools)))
f1021afb 148 (arguments
6885745d
KK
149 `(#:test-target "test"
150 #:configure-flags (list "-DENABLE_TESTING=1"
151 (string-append
152 "-DCMAKE_CXX_FLAGS=-isystem "
153 (assoc-ref %build-inputs "qtserialport")
154 "/include/qt5"))
155 #:phases (modify-phases %standard-phases
156 (add-before 'check 'set-offscreen-display
157 (lambda _
158 ;; make Qt render "offscreen", required for tests
159 (setenv "QT_QPA_PLATFORM" "offscreen")
160 (setenv "HOME" "/tmp")
161 #t)))))
f1021afb
JD
162 (home-page "http://www.stellarium.org/")
163 (synopsis "3D sky viewer")
164 (description "Stellarium is a planetarium. It shows a realistic sky in
1653D, just like what you see with the naked eye, binoculars, or a telescope. It
166can be used to control telescopes over a serial port for tracking celestial
167objects.")
0558e968 168 (license license:gpl2+)))