nixpkgs/pkgs/development/libraries/grib-api/default.nix

65 lines
2.1 KiB
Nix
Raw Normal View History

{ fetchurl, stdenv,
cmake, netcdf, gfortran, jasper, libpng,
enablePython ? false, pythonPackages }:
2015-12-18 15:16:39 +00:00
stdenv.mkDerivation rec{
name = "grib-api-${version}";
grib-api: 1.26.1 -> 1.27.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/grib-api/versions. These checks were done: - built on NixOS - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_keys had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_histogram passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_error had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_add had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/big2gribex had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_debug passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_info passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_filter passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_ls passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_dump passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib2ppm passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_set passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_get passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_get_data passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_copy passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_repair had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_packing passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_cmp had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_convert passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_distance had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_corruption_check had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_compare passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_parser had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_count had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_index_build passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/gg_sub_area_check had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_moments had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_to_json had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_to_netcdf passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_list_keys passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_check had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_name had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_accumulations had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_split had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib1to2 had a zero exit code or showed the expected version - 16 of 35 passed binary check by having a zero exit code. - 12 of 35 passed binary check by having the new version present in output. - found 1.27.0 with grep in /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0 - directory tree listing: https://gist.github.com/e6dee35a40cc23e8f92ab31e61d97635 - du listing: https://gist.github.com/09b91902bb419c1eb0f13bbc8e6a9ac0
2018-07-04 07:59:09 +00:00
version = "1.27.0";
2015-12-18 15:16:39 +00:00
src = fetchurl {
url = "https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-${version}-Source.tar.gz";
grib-api: 1.26.1 -> 1.27.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/grib-api/versions. These checks were done: - built on NixOS - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_keys had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_histogram passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_error had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_add had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/big2gribex had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_debug passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_info passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_filter passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_ls passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_dump passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib2ppm passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_set passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_get passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_get_data passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_copy passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_repair had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_packing passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_cmp had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_convert passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_distance had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_corruption_check had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_compare passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_parser had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_count had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_index_build passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/gg_sub_area_check had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_moments had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_to_json had a zero exit code or showed the expected version - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_to_netcdf passed the binary check. - /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib_list_keys passed the binary check. - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_check had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_name had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_accumulations had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/tigge_split had a zero exit code or showed the expected version - Warning: no invocation of /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0/bin/grib1to2 had a zero exit code or showed the expected version - 16 of 35 passed binary check by having a zero exit code. - 12 of 35 passed binary check by having the new version present in output. - found 1.27.0 with grep in /nix/store/r53ihy5m6ckhm98bm7bnwdpdj59r7qs0-grib-api-1.27.0 - directory tree listing: https://gist.github.com/e6dee35a40cc23e8f92ab31e61d97635 - du listing: https://gist.github.com/09b91902bb419c1eb0f13bbc8e6a9ac0
2018-07-04 07:59:09 +00:00
sha256 = "1vx6bx9jhz5vdh2vx5y532ihwgyylagqz6pbx2p2bsx4kmj4pxdd";
2015-12-18 15:16:39 +00:00
};
preConfigure = ''
# Fix "no member named 'inmem_' in 'jas_image_t'"
substituteInPlace "src/grib_jasper_encoding.c" --replace "image.inmem_ = 1;" ""
'';
buildInputs = [ cmake
netcdf
gfortran
2015-12-18 15:16:39 +00:00
jasper
libpng
] ++ stdenv.lib.optionals enablePython [
pythonPackages.python
2015-12-18 15:16:39 +00:00
];
propagatedBuildInputs = stdenv.lib.optionals enablePython [
pythonPackages.numpy
];
cmakeFlags = [ "-DENABLE_PYTHON=${if enablePython then "ON" else "OFF"}"
"-DENABLE_PNG=ON"
"-DENABLE_FORTRAN=ON"
];
enableParallelBuilding = true;
2015-12-18 15:16:39 +00:00
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
'';
2015-12-18 15:16:39 +00:00
meta = with stdenv.lib; {
homepage = https://software.ecmwf.int/wiki/display/GRIB/Home;
2015-12-18 15:16:39 +00:00
license = licenses.asl20;
platforms = with platforms; linux ++ darwin;
2015-12-18 15:16:39 +00:00
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 ];
2015-12-18 15:16:39 +00:00
};
}