+(define-public libskry
+ (package
+ (name "libskry")
+ (version "0.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/GreatAttractor/libskry")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14kwng0j8wqzlb0gqg3ayq36l15dpz7kvxc56fa47j55b376bwh6"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list
+ (string-append
+ "LIBAV_INCLUDE_PATH=" (assoc-ref %build-inputs "ffmpeg") "/include"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ;; no configure provided
+ (delete 'check) ;; no tests provided
+ (replace 'install
+ ;; The Makefile lacks an ‘install’ target.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (include (string-append out "/include")))
+ (copy-recursively "bin" lib)
+ (copy-recursively "include" include))
+ #t)))))
+ (inputs
+ `(("ffmpeg" ,ffmpeg)))
+ (home-page "https://github.com/GreatAttractor/libskry")
+ (synopsis "Astronimical lucky imaging library")
+ (description
+ "@code{libskry} implements the lucky imaging principle of astronomical
+imaging: creating a high-quality still image out of a series of many thousands)
+low quality ones")
+ (license license:gpl3+)))
+
+(define-public libpasastro
+ ;; NOTE: (Sharlatan-20210122T215921+0000): the version tag has a build
+ ;; error on spice which is resolved with the latest commit.
+ (let ((commit "e3c218d1502a18cae858c83a9a8812ab197fcb60")
+ (revision "1"))
+ (package
+ (name "libpasastro")
+ (version (git-version "1.4.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pchev/libpasastro")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0asp2sn34nds5va2ghppwc41vb6j3d1mf049j949rgrll817kx47"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:make-flags
+ (list
+ ,(match (or (%current-target-system) (%current-system))
+ ((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
+ "OS_TARGET=linux")
+ (_ #f))
+ ,(match (or (%current-target-system) (%current-system))
+ ("i686-linux" "CPU_TARGET=i386")
+ ("x86_64-linux" "CPU_TARGET=x86_64")
+ ((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l")
+ (_ #f))
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "https://github.com/pchev/libpasastro")
+ (synopsis "Interface to astronomy library for use from Pascal program")
+ (description
+ "This package provides shared libraries to interface Pascal program with
+standard astronomy libraries:
+
+@itemize
+@item @code{libpasgetdss.so}: Interface with GetDSS to work with DSS images.
+@item @code{libpasplan404.so}: Interface with Plan404 to compute planets position.
+@item @code{libpaswcs.so}: Interface with libwcs to work with FITS WCS.
+@item @code{libpasspice.so}: To work with NAIF/SPICE kernel.
+@end itemize\n")
+ (license license:gpl2+))))
+
+(define-public missfits
+ (package
+ (name "missfits")
+ (version "2.8.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.astromatic.net/download/missfits/"
+ "missfits-" version ".tar.gz"))
+ (sha256
+ (base32 "04jrd7fsvzr14vdmwgj2f6v97gdcfyjyz6jppml3ghr9xh12jxv5"))))
+ (build-system gnu-build-system)
+ (home-page "https://www.astromatic.net/software/missfits")
+ (synopsis "FITS files Maintenance program")
+ (description
+ "MissFITS is a program that performs basic maintenance and packaging tasks
+on FITS files:
+
+@itemize
+@item add/edit FITS header keywords
+@item split/join Multi-Extension-FITS (MEF) files
+@item unpack/pack FITS data-cubes
+@item create/check/update FITS checksums, using R. Seaman's protocol
+ (see http://www.adass.org/adass/proceedings/adass94/seamanr.html)
+@end itemize\n")
+ (license license:gpl3+)))
+
+(define-public xplanet
+ (package
+ (name "xplanet")
+ (version "1.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append
+ "mirror://sourceforge/xplanet/xplanet/"
+ version "/xplanet-" version ".tar.gz"))
+ (sha256
+ (base32 "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023"))
+ (patches
+ (search-patches
+ "xplanet-1.3.1-cxx11-eof.patch"
+ "xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch"
+ "xplanet-1.3.1-libimage_gif.c.patch"
+ "xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libx11" ,libx11)
+ ("libxscrnsaver" ,libxscrnsaver)
+ ("libice" ,libice)
+ ("freetype" ,freetype)
+ ("pango" ,pango)
+ ("giflib" ,giflib)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)
+ ("netpbm" ,netpbm)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:configure-flags
+ (let ((netpbm (assoc-ref %build-inputs "netpbm")))
+ (append (list
+ ;; Give correct path for pnm.h header to configure script
+ (string-append "CPPFLAGS=-I" netpbm "/include/netpbm")
+ ;; no nasa jpl cspice support
+ "--without-cspice" )))))
+ (home-page "http://xplanet.sourceforge.net/")
+ (synopsis "Planetary body renderer")
+ (description
+ "Xplanet renders an image of a planet into an X window or file.
+All of the major planets and most satellites can be drawn and different map
+projections are also supported, including azimuthal, hemisphere, Lambert,
+Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.")
+ (license license:gpl2+)))
+
+(define-public gpredict
+ (package
+ (name "gpredict")
+ (version "2.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/csete/gpredict/releases"
+ "/download/v" version
+ "/gpredict-" version ".tar.bz2"))
+ (sha256
+ (base32 "0hwf97kng1zy8rxyglw04x89p0bg07zq30hgghm20yxiw2xc8ng7"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("intltool" ,intltool)
+ ("gettext" ,gettext-minimal)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("curl" ,curl)
+ ("glib" ,glib)
+ ("goocanvas" ,goocanvas)
+ ("gtk+" ,gtk+)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ ;; Remove reference to non-existent file.
+ (substitute* "po/POTFILES.in"
+ (("src/gtk-sat-tree\\.c")
+ ""))
+ #t)))))
+ (synopsis "Satellite tracking and orbit prediction application")
+ (description
+ "Gpredict is a real-time satellite tracking and orbit prediction
+application. It can track a large number of satellites and display their
+position and other data in lists, tables, maps, and polar plots (radar view).
+Gpredict can also predict the time of future passes for a satellite, and
+provide you with detailed information about each pass.")
+ (home-page "http://gpredict.oz9aec.net/index.php")
+ (license license:gpl2+)))
+
+(define-public indi
+ (package
+ (name "indi")
+ (version "1.8.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/indilib/indi")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0nw4b2cdsg244slcm3yf1v11jlxbbjrpvi6ax90svs7rlandz8jv"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list
+ "-DINDI_BUILD_UNITTESTS=ON"
+ "-DCMAKE_BUILD_TYPE=Release"
+ (string-append "-DCMAKE_INSTALL_PREFIX=" out)
+ (string-append "-DUDEVRULES_INSTALL_DIR=" out "/lib/udev/rules.d")))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (chdir "test")
+ (invoke "ctest")
+ (chdir "..")
+ #t))
+ (add-before 'install 'set-install-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/lib/udev/rules.d")))
+ #t)))))
+ (native-inputs
+ `(("googletest" ,googletest)))
+ (inputs
+ `(("cfitsio" ,cfitsio)
+ ("curl" ,curl)
+ ("fftw" ,fftw)
+ ("gsl" ,gsl)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libnova" ,libnova)
+ ("libtiff" ,libtiff)
+ ("libusb" ,libusb)
+ ("zlib" ,zlib)))
+ (home-page "https://www.indilib.org")
+ (synopsis "Library for astronimical intrumentation control")
+ (description
+ "INDI (Instrument-Neutral Device Interface) is a distributed XML-based
+control protocol designed to operate astronomical instrumentation. INDI is
+small, flexible, easy to parse, scalable, and stateless. It supports common
+DCS functions such as remote control, data acquisition, monitoring, and a lot
+more.")
+ (license (list license:bsd-3
+ license:gpl2+
+ license:lgpl2.0+
+ license:lgpl2.1+))))
+
+(define-public python-jplephem
+ (package
+ (name "python-jplephem")
+ (version "2.15")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "jplephem" version))
+ (sha256
+ (base32 "1ca3dswsslij79qg6dcijjz4l0fj6nzmxld8z93v45ahlkhps0g0"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (setenv "PYTHONPATH"
+ (string-append "./build/lib:"
+ (getenv "PYTHONPATH")))
+ (setenv "PATH" (string-append out "/bin:"
+ (getenv "PATH")))
+ (invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
+ (inputs
+ `(("python-numpy" ,python-numpy)))
+ (home-page "https://github.com/brandon-rhodes/python-jplephem")
+ (synopsis "Python version of NASA DE4xx ephemerides")
+ (description
+ "The package is a Python implementation of the mathematics that standard
+JPL ephemerides use to predict raw (x,y,z) planetary positions.")
+ (license license:expat)))
+
+(define-public python-pyerfa
+ (package
+ (name "python-pyerfa")
+ (version "1.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyerfa" version))
+ (sha256
+ (base32 "1s78mdyrxha2jcckfs0wg5ynkf0pwh1bw9mmh99vprinxh9n4xri"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove bundled submodule library.
+ (delete-file-recursively "liberfa")
+ #t))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'use-system-liberfa
+ (lambda _
+ (setenv "PYERFA_USE_SYSTEM_LIBERFA" "1")
+ #t)))))
+ (native-inputs
+ `(("pytest" ,python-pytest)
+ ("setuptools-scm" ,python-setuptools-scm)
+ ("pytest-doctestplus" ,python-pytest-doctestplus)))
+ (inputs
+ `(("liberfa" ,erfa)
+ ("numpy" ,python-numpy)))
+ (home-page "https://github.com/liberfa/pyerfa")
+ (synopsis "Python bindings for ERFA")
+ (description
+ "PyERFA is the Python wrapper for the ERFA library (Essential
+Routines for Fundamental Astronomy), a C library containing key algorithms for
+astronomy, which is based on the SOFA library published by the International
+Astronomical Union (IAU). All C routines are wrapped as Numpy universal
+functions, so that they can be called with scalar or array inputs.")
+ (license license:bsd-3)))
+
+(define-public python-sep
+ (package
+ (name "python-sep")
+ (version "1.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sep" version))
+ (sha256
+ (base32 "0wxdqn92q1grv8k7xi7h88ac6wnznw4xh5bdlz1vz6za2dgsyj4m"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("cython" ,python-cython)
+ ("pytest" ,python-pytest)))
+ (inputs
+ `(("numpy" ,python-numpy)))
+ (home-page "https://github.com/kbarbary/sep")
+ (synopsis "Astronomical source extraction and photometry library")
+ (description
+ "SEP makes the core algorithms of Source Extractor available as a library
+of stand-alone functions and classes.")
+ (license (list license:bsd-3
+ license:expat
+ license:lgpl3+))))
+
+(define-public python-asdf
+ (package
+ (name "python-asdf")
+ (version "2.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "asdf" version))
+ (sha256
+ (base32 "1y47zhkd90i8wmm2i35amfl0rvjqlb3fcx90xp7n9kr2z0byzyzg"))))
+ (build-system python-build-system)
+ (arguments
+ ;; TODO: (Sharlatan-20210207T165820+0000): Tests depend on astropy, astropy
+ ;; depends on asdf. Disable circular dependence.
+ `(#:tests? #f))
+ (native-inputs
+ `(("packaging" ,python-packaging)
+ ("semantic-version" ,python-semantic-version)
+ ("setuptools-scm" ,python-setuptools-scm)))
+ (inputs
+ `(("importlib-resources" ,python-importlib-resources)
+ ("jsonschema" ,python-jsonschema)
+ ("numpy" ,python-numpy)
+ ("pyyaml" ,python-pyyaml)))
+ (home-page "https://github.com/asdf-format/asdf")
+ (synopsis "Python tools to handle ASDF files")
+ (description
+ "The Advanced Scientific Data Format (ASDF) is a next-generation
+interchange format for scientific data. This package contains the Python
+implementation of the ASDF Standard.")
+ (license license:bsd-3)))
+
+(define-public python-astroalign
+ (package
+ (name "python-astroalign")
+ (version "2.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "astroalign" version))
+ (sha256
+ (base32 "19qzv3552lgrd9qmj0rxs51wmx485hw04cbf76ds5pin85kfaiy1"))))
+ (build-system python-build-system)
+ (arguments
+ ;; TODO: (Sharlatan-20210213T162940+0000): I could not make tests run
+ `(#:tests? #f))
+ (inputs
+ `(("numpy" ,python-numpy)
+ ("scikit-image" ,python-scikit-image)
+ ("scipy" ,python-scipy)
+ ("sep" ,python-sep)))
+ (home-page "https://astroalign.readthedocs.io/")
+ (synopsis "Astrometric Alignment of Images")
+ (description
+ "ASTROALIGN is a python module that will try to align two stellar
+astronomical images, especially when there is no WCS information available.")
+ (license license:expat)))
+
+(define-public python-skyfield
+ (package
+ (name "python-skyfield")
+ (version "1.36")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "skyfield" version))
+ (sha256
+ (base32 "1dm1327a4qv3klj9blrvddbhl72v1fqz52ym9km8qjj9vdkpywh6"))))
+ (build-system python-build-system)
+ (arguments
+ ;; NOTE: (Sharlatan-20210207T163305+0000): tests depend on custom test
+ ;; framework https://github.com/brandon-rhodes/assay
+ `(#:tests? #f))
+ (inputs
+ `(("certifi" ,python-certifi)
+ ("jplephem" ,python-jplephem)
+ ("numpy" ,python-numpy)
+ ("sgp4" ,python-sgp4)))
+ (home-page "https://rhodesmill.org/skyfield/")
+ (synopsis "Astronomy for Python")
+ (description
+ "Skyfield computes positions for the stars, planets, and satellites in
+orbit around the Earth.")
+ (license license:expat)))