1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 11:32:03 +00:00
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.24.0 -> 1.26.0 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_histogram -h` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_histogram --help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_histogram help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_debug -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_info -v` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_filter -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_ls help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_ls -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_dump -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib2ppm -h` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib2ppm --help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib2ppm help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_set -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_get -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_get_data -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_copy -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_packing help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_packing version` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_packing help` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_convert -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_corruption_check help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_corruption_check version` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_corruption_check help` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_compare -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_parser help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_count help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_index_build help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_index_build -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_to_json help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_to_netcdf -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_list_keys help` got 0 exit code - found 1.26.0 with grep in /nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0
2018-03-14 17:45:01 +00:00
version = "1.26.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.24.0 -> 1.26.0 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_histogram -h` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_histogram --help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_histogram help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_debug -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_info -v` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_filter -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_ls help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_ls -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_dump -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib2ppm -h` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib2ppm --help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib2ppm help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_set -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_get -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_get_data -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_copy -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_packing help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_packing version` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_packing help` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_convert -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_corruption_check help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_corruption_check version` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_corruption_check help` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_compare -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_parser help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_count help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_index_build help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_index_build -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_to_json help` got 0 exit code - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_to_netcdf -V` and found version 1.26.0 - ran `/nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0/bin/grib_list_keys help` got 0 exit code - found 1.26.0 with grep in /nix/store/7371b0i6vd3ryh90kikrfcpa6am6ls8y-grib-api-1.26.0
2018-03-14 17:45:01 +00:00
sha256 = "00cmmj44bhdlzhqbvwb3bb4xks3bpva669m6g3g6ffjaqm25b90c";
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
};
}