diff options
author | Josef Kemetmueller <josef.kemetmueller@aon.at> | 2016-12-15 20:44:02 +0100 |
---|---|---|
committer | Josef Kemetmueller <josef.kemetmueller@aon.at> | 2017-01-08 12:42:25 +0100 |
commit | 64e4b7ac423d4e660d350fd1e9423eb009c14e9d (patch) | |
tree | 5738a71402287b9704be81823a8c9350fd52baa6 /pkgs/development/libraries/grib-api | |
parent | 78ffee7f063f568b0b8338c6d2ae21cb47380ec9 (diff) | |
download | nixpkgs-64e4b7ac423d4e660d350fd1e9423eb009c14e9d.tar nixpkgs-64e4b7ac423d4e660d350fd1e9423eb009c14e9d.tar.gz nixpkgs-64e4b7ac423d4e660d350fd1e9423eb009c14e9d.tar.bz2 nixpkgs-64e4b7ac423d4e660d350fd1e9423eb009c14e9d.tar.lz nixpkgs-64e4b7ac423d4e660d350fd1e9423eb009c14e9d.tar.xz nixpkgs-64e4b7ac423d4e660d350fd1e9423eb009c14e9d.tar.zst nixpkgs-64e4b7ac423d4e660d350fd1e9423eb009c14e9d.zip |
grib-api: 1.14.4 -> 1.19.0
- Remove downloading of testdata during buildPhase to - fix hydra build - remove impurity - reduce traffic - Bump version - Add myself as a maintainer
Diffstat (limited to 'pkgs/development/libraries/grib-api')
-rw-r--r-- | pkgs/development/libraries/grib-api/default.nix | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/pkgs/development/libraries/grib-api/default.nix b/pkgs/development/libraries/grib-api/default.nix index ee505b54e7e..ca2fb728262 100644 --- a/pkgs/development/libraries/grib-api/default.nix +++ b/pkgs/development/libraries/grib-api/default.nix @@ -1,32 +1,60 @@ -{ fetchurl, stdenv, curl, - netcdf, jasper, openjpeg }: +{ fetchurl, stdenv, + cmake, netcdf, gfortran, jasper, libpng, + enablePython ? false, pythonPackages }: stdenv.mkDerivation rec{ name = "grib-api-${version}"; - version = "1.14.4"; + version = "1.19.0"; src = fetchurl { - url = https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.14.4-Source.tar.gz; - sha256 = "1w8z9y79wakhwv1r4rb4dwlh9pbyw367klcm6laxz91hhvfrpfq8"; + url = "https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-${version}-Source.tar.gz"; + sha256 = "07cj9mw5bb249lxx1m9nmfdqb8b2a8cm7s6x62cdwca3sp16dv6a"; }; - buildInputs = [ netcdf + preConfigure = '' + # Fix "no member named 'inmem_' in 'jas_image_t'" + substituteInPlace "src/grib_jasper_encoding.c" --replace "image.inmem_ = 1;" "" + ''; + + buildInputs = [ cmake + netcdf + gfortran jasper - openjpeg - curl # Used for downloading during make test + libpng + ] ++ stdenv.lib.optionals enablePython [ + pythonPackages.python ]; + + cmakeFlags = [ "-DENABLE_PYTHON=${if enablePython then "ON" else "OFF"}" + "-DENABLE_PNG=ON" + "-DENABLE_FORTRAN=ON" + ]; + + enableParallelBuilding = true; + doCheck = true; + # Only do tests that don't require downloading 120MB of testdata + # We fix the darwin checkPhase, which searches for libgrib_api.dylib + # in /nix/store by setting DYLD_LIBRARY_PATH + checkPhase = stdenv.lib.optionalString (stdenv.isDarwin) '' + substituteInPlace "tests/include.sh" --replace "set -ea" "set -ea; export DYLD_LIBRARY_PATH=$(pwd)/lib" + '' + '' + ctest -R "t_definitions|t_calendar|t_unit_tests" -VV + ''; + + meta = with stdenv.lib; { homepage = "https://software.ecmwf.int/wiki/display/GRIB/Home"; license = licenses.asl20; + platforms = with platforms; linux ++ darwin; description = "ECMWF Library for the GRIB file format"; longDescription = '' The ECMWF GRIB API is an application program interface accessible from C, FORTRAN and Python programs developed for encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages. ''; - + maintainers = with maintainers; [ knedlsepp ]; }; } |