2019-05-10 13:11:07 +01:00
|
|
|
{ fetchurl, stdenv
|
2009-10-19 13:50:37 +01:00
|
|
|
|
2019-05-10 13:11:07 +01:00
|
|
|
# Optional dependencies
|
|
|
|
, bzip2 ? null }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cfitsio-${version}";
|
|
|
|
version = "3.450";
|
2009-10-19 13:50:37 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-05-10 13:11:07 +01:00
|
|
|
url = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio${builtins.replaceStrings ["."] [""] version}.tar.gz";
|
|
|
|
sha256 = "0bmrkw6w65zb0k3mszaaqy1f4zjm2hl7njww74nb5v38wvdi4q5z";
|
2009-10-19 13:50:37 +01:00
|
|
|
};
|
|
|
|
|
2019-05-10 13:11:07 +01:00
|
|
|
buildInputs = [ bzip2 ];
|
|
|
|
|
2018-05-31 10:55:10 +01:00
|
|
|
patches = [ ./darwin-curl-config.patch ./darwin-rpath-universal.patch ];
|
2018-05-30 13:31:07 +01:00
|
|
|
|
2019-05-10 13:11:07 +01:00
|
|
|
configureFlags = stdenv.lib.optional (bzip2 != null) "--with-bzip2=${bzip2.out}";
|
|
|
|
|
2009-10-19 13:50:37 +01:00
|
|
|
# Shared-only build
|
|
|
|
buildFlags = "shared";
|
2018-05-30 13:31:07 +01:00
|
|
|
postPatch = '' sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in
|
2009-10-19 13:50:37 +01:00
|
|
|
'';
|
|
|
|
|
2017-03-17 21:44:16 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-02 22:50:51 +01:00
|
|
|
homepage = https://heasarc.gsfc.nasa.gov/fitsio/;
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Library for reading and writing FITS data files";
|
2009-10-19 13:50:37 +01:00
|
|
|
longDescription =
|
|
|
|
'' CFITSIO is a library of C and Fortran subroutines for reading and
|
|
|
|
writing data files in FITS (Flexible Image Transport System) data
|
|
|
|
format. CFITSIO provides simple high-level routines for reading and
|
|
|
|
writing FITS files that insulate the programmer from the internal
|
|
|
|
complexities of the FITS format. CFITSIO also provides many
|
|
|
|
advanced features for manipulating and filtering the information in
|
|
|
|
FITS files.
|
|
|
|
'';
|
2019-05-10 13:11:07 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.xbreak ];
|
2018-05-30 13:31:07 +01:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2009-10-19 13:50:37 +01:00
|
|
|
};
|
2008-01-28 19:46:59 +00:00
|
|
|
}
|