gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / astronomy.scm
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)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix download)
23 #:use-module (gnu packages image)
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)
29 #:use-module (gnu packages maths)
30 #:use-module (guix build-system cmake)
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 _
52 (substitute* "Makefile.in" (("/bin/") ""))
53 #t)))))
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
57 writing FITS (Flexible Image Transport System) files that insulate the
58 programmer from the internal complexities of the FITS format. CFITSIO also
59 provides many advanced features for manipulating and filtering the information
60 in FITS files.")
61 (license (license:non-copyleft "file://License.txt"
62 "See License.txt in the distribution."))))
63
64 (define-public wcslib
65 (package
66 (name "wcslib")
67 (version "5.16")
68 (source
69 (origin
70 (method url-fetch)
71 (uri (string-append
72 "ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
73 ".tar.bz2"))
74 (sha256
75 (base32 "1vwrzkznpig2q40m11j12hsfqvsjz8z44l66pz5fkh6fy461w0zd"))))
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"
84 (("/bin/sh") "sh"))
85 #t)))))
86 (home-page "http://www.atnf.csiro.au/people/mcalabre/WCS")
87 (synopsis "Library which implements the FITS WCS standard")
88 (description "The FITS \"World Coordinate System\" (WCS) standard defines
89 keywords and usage that provide for the description of astronomical coordinate
90 systems in a FITS image header.")
91 (license license:lgpl3+)))
92
93 (define-public gnuastro
94 (package
95 (name "gnuastro")
96 (version "0.2")
97 (source
98 (origin
99 (method url-fetch)
100 (uri (string-append "mirror://gnu/gnuastro/gnuastro-"
101 version ".tar.gz"))
102 (sha256
103 (base32
104 "0099g7zqg1gr9y94ybhyjgx9pkn9zv4rj1xb00fkybfw8w6ij9iv"))))
105 (inputs
106 `(("cfitsio" ,cfitsio)
107 ("gsl" ,gsl)
108 ("libjpeg" ,libjpeg-8)
109 ("wcslib" ,wcslib)))
110 (build-system gnu-build-system)
111 (home-page "https://www.gnu.org/software/gnuastro")
112 (synopsis "Astronomical data manipulation programs")
113 (description "The GNU Astronomy Utilities (Gnuastro) is a suite of
114 programs for the manipulation and analysis of astronomical data.")
115 (license license:gpl3+)))
116
117 (define-public stellarium
118 (package
119 (name "stellarium")
120 (version "0.15.1")
121 (source (origin
122 (method url-fetch)
123 (uri (string-append "mirror://sourceforge/stellarium/"
124 "Stellarium-sources/"
125 version "/stellarium-" version ".tar.gz"))
126 (sha256
127 (base32
128 "04avigz8i8mi2x6x71bqr9np85n1p9qnvbj2hxr947f1jv22zr8g"))))
129 (build-system cmake-build-system)
130 (inputs
131 `(("qtbase" ,qtbase)
132 ("qtmultimedia" ,qtmultimedia)
133 ("qtscript" ,qtscript)
134 ("qtserialport" ,qtserialport)
135 ("zlib" ,zlib)))
136 (native-inputs
137 `(("gettext" ,gettext-minimal) ; xgettext is used at compile time
138 ("perl" ,perl) ; For pod2man
139 ("qtbase" ,qtbase) ; Qt MOC is needed at compile time
140 ("qttools" ,qttools)))
141 (arguments
142 `(#:test-target "tests"
143 #:phases (modify-phases %standard-phases
144 (add-before 'check 'set-offscreen-display
145 (lambda _
146 (setenv "QT_QPA_PLATFORM" "offscreen")
147 (setenv "HOME" "/tmp")
148 #t)))))
149 (home-page "http://www.stellarium.org/")
150 (synopsis "3D sky viewer")
151 (description "Stellarium is a planetarium. It shows a realistic sky in
152 3D, just like what you see with the naked eye, binoculars, or a telescope. It
153 can be used to control telescopes over a serial port for tracking celestial
154 objects.")
155 (license license:gpl2+)))