From 152b1e4dbcd149b6a8f3db69e3c7925b66671ba3 Mon Sep 17 00:00:00 2001 From: xbreak Date: Fri, 10 May 2019 12:11:07 +0000 Subject: [PATCH] cfitsio: 3.430 -> 3.450 The derivation is also updated to optionally build cfitsio with bzip2 support (enabled by default). --- .../development/libraries/cfitsio/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/cfitsio/default.nix b/pkgs/development/libraries/cfitsio/default.nix index a21158723be1..32308c34ead1 100644 --- a/pkgs/development/libraries/cfitsio/default.nix +++ b/pkgs/development/libraries/cfitsio/default.nix @@ -1,15 +1,23 @@ -{ fetchurl, stdenv }: +{ fetchurl, stdenv - stdenv.mkDerivation { - name = "cfitsio-3.430"; +# Optional dependencies +, bzip2 ? null }: + +stdenv.mkDerivation rec { + name = "cfitsio-${version}"; + version = "3.450"; src = fetchurl { - url = "ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3430.tar.gz"; - sha256 = "07fghxh5fl8nqk3q0dh8rvc83npnm0hisxzcj16a6r7gj5pmp40l"; + url = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio${builtins.replaceStrings ["."] [""] version}.tar.gz"; + sha256 = "0bmrkw6w65zb0k3mszaaqy1f4zjm2hl7njww74nb5v38wvdi4q5z"; }; + buildInputs = [ bzip2 ]; + patches = [ ./darwin-curl-config.patch ./darwin-rpath-universal.patch ]; + configureFlags = stdenv.lib.optional (bzip2 != null) "--with-bzip2=${bzip2.out}"; + # Shared-only build buildFlags = "shared"; postPatch = '' sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in @@ -27,8 +35,8 @@ advanced features for manipulating and filtering the information in FITS files. ''; - # Permissive BSD-style license. - license = "permissive"; + license = licenses.mit; + maintainers = [ maintainers.xbreak ]; platforms = with platforms; linux ++ darwin; }; }