gnu: xdg-utils: Update to 1.1.2.
[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>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages astronomy)
20 #:use-module (guix packages)
c9bd15c1 21 #:use-module ((guix licenses) #:prefix license:)
82e4557d 22 #:use-module (guix download)
c9bd15c1 23 #:use-module (gnu packages image)
0558e968
JD
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages gettext)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages gl)
28 #:use-module (gnu packages qt)
c9bd15c1 29 #:use-module (gnu packages maths)
0558e968 30 #:use-module (guix build-system cmake)
82e4557d
JD
31 #:use-module (guix build-system gnu))
32
33(define-public cfitsio
34 (package
35 (name "cfitsio")
36 (version "3390")
37 (source
38 (origin
39 (method url-fetch)
40 (uri (string-append
41 "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/" name version
42 ".tar.gz"))
43 (sha256
44 (base32 "02gllydm63irwbqqisa3mrskw1fphm5rlplglz3mq9whi3rxilv2"))))
45 (build-system gnu-build-system)
46 (arguments
47 `(#:tests? #f ; no tests
48 #:phases
49 (modify-phases %standard-phases
50 (add-after 'unpack 'patch-paths
51 (lambda _
39fb6295
JD
52 (substitute* "Makefile.in" (("/bin/") ""))
53 #t)))))
82e4557d
JD
54 (home-page "http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
55 (synopsis "Library for reading and writing FITS files")
56 (description "CFITSIO provides simple high-level routines for reading and
57writing FITS (Flexible Image Transport System) files that insulate the
58programmer from the internal complexities of the FITS format. CFITSIO also
59provides many advanced features for manipulating and filtering the information
60in FITS files.")
61 (license (license:non-copyleft "file://License.txt"
62 "See License.txt in the distribution."))))
2be83f6e
JD
63
64(define-public wcslib
65 (package
66 (name "wcslib")
7651a4b2 67 (version "5.17")
2be83f6e
JD
68 (source
69 (origin
70 (method url-fetch)
71 (uri (string-append
39fb6295
JD
72 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
73 ".tar.bz2"))
2be83f6e 74 (sha256
7651a4b2 75 (base32 "0v23x1fw01arhmqdrzfd9n593mjglhzfyx4793v065z0dg4bb72w"))))
2be83f6e
JD
76 (inputs
77 `(("cfitsio" ,cfitsio)))
78 (build-system gnu-build-system)
79 (arguments
80 `(#:phases (modify-phases %standard-phases
81 (add-before 'configure 'patch-/bin/sh
82 (lambda _
83 (substitute* "makedefs.in"
39fb6295
JD
84 (("/bin/sh") "sh"))
85 #t)))))
d4442eaf 86 (home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
a7074f47 87 (synopsis "Library which implements the FITS WCS standard")
2be83f6e
JD
88 (description "The FITS \"World Coordinate System\" (WCS) standard defines
89keywords and usage that provide for the description of astronomical coordinate
a7074f47 90systems in a FITS image header.")
2be83f6e 91 (license license:lgpl3+)))
c9bd15c1
JD
92
93(define-public gnuastro
94 (package
95 (name "gnuastro")
09c9fe4a 96 (version "0.5")
c9bd15c1
JD
97 (source
98 (origin
99 (method url-fetch)
100 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
101 version ".tar.gz"))
102 (sha256
103 (base32
09c9fe4a 104 "10lxzxyrf30hj3bqdgprvaj9phzdi816khjmr0vmjf8pmsr8bqqr"))))
c9bd15c1
JD
105 (inputs
106 `(("cfitsio" ,cfitsio)
107 ("gsl" ,gsl)
09c9fe4a 108 ("libjpeg" ,libjpeg)
c9bd15c1
JD
109 ("wcslib" ,wcslib)))
110 (build-system gnu-build-system)
6fd52309 111 (home-page "https://www.gnu.org/software/gnuastro/")
ea4678a4 112 (synopsis "Astronomy utilities")
c9bd15c1
JD
113 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
114programs for the manipulation and analysis of astronomical data.")
115 (license license:gpl3+)))
0558e968
JD
116
117(define-public stellarium
118 (package
119 (name "stellarium")
6885745d 120 (version "0.17.0")
f1021afb
JD
121 (source (origin
122 (method url-fetch)
6885745d
KK
123 (uri (string-append "https://github.com/Stellarium/" name
124 "/releases/download/v" version
125 "/" name "-" version ".tar.gz"))
126 (file-name (string-append name "-" version ".tar.gz"))
f1021afb
JD
127 (sha256
128 (base32
6885745d 129 "0d6b3fs5aify7i1lwgkcickppnj73cbh24g8qschnfs3ypdf48fc"))))
0558e968 130 (build-system cmake-build-system)
6b2afac9 131 (inputs
5bbf31cc 132 `(("qtbase" ,qtbase)
b74e2f61 133 ("qtlocation" ,qtlocation)
5bbf31cc
DM
134 ("qtmultimedia" ,qtmultimedia)
135 ("qtscript" ,qtscript)
136 ("qtserialport" ,qtserialport)
6b2afac9
DM
137 ("zlib" ,zlib)))
138 (native-inputs
139 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
5bbf31cc
DM
140 ("perl" ,perl) ; For pod2man
141 ("qtbase" ,qtbase) ; Qt MOC is needed at compile time
142 ("qttools" ,qttools)))
f1021afb 143 (arguments
6885745d
KK
144 `(#:test-target "test"
145 #:configure-flags (list "-DENABLE_TESTING=1"
146 (string-append
147 "-DCMAKE_CXX_FLAGS=-isystem "
148 (assoc-ref %build-inputs "qtserialport")
149 "/include/qt5"))
150 #:phases (modify-phases %standard-phases
151 (add-before 'check 'set-offscreen-display
152 (lambda _
153 ;; make Qt render "offscreen", required for tests
154 (setenv "QT_QPA_PLATFORM" "offscreen")
155 (setenv "HOME" "/tmp")
156 #t)))))
f1021afb
JD
157 (home-page "http://www.stellarium.org/")
158 (synopsis "3D sky viewer")
159 (description "Stellarium is a planetarium. It shows a realistic sky in
1603D, just like what you see with the naked eye, binoculars, or a telescope. It
161can be used to control telescopes over a serial port for tracking celestial
162objects.")
0558e968 163 (license license:gpl2+)))