diff --git a/pkgs/development/libraries/eccodes/default.nix b/pkgs/development/libraries/eccodes/default.nix index 1050490a220b..ad8ee222f7f9 100644 --- a/pkgs/development/libraries/eccodes/default.nix +++ b/pkgs/development/libraries/eccodes/default.nix @@ -1,39 +1,51 @@ -{ fetchurl, lib, stdenv -, cmake, netcdf, openjpeg, libpng, gfortran -, enablePython ? false, pythonPackages +{ fetchurl +, lib +, stdenv +, cmake +, netcdf +, openjpeg +, libpng +, gfortran +, perl +, enablePython ? false +, pythonPackages , enablePosixThreads ? false -, enableOpenMPThreads ? false}: -with lib; +, enableOpenMPThreads ? false +}: + stdenv.mkDerivation rec { pname = "eccodes"; - version = "2.12.5"; + version = "2.23.0"; src = fetchurl { url = "https://confluence.ecmwf.int/download/attachments/45757960/eccodes-${version}-Source.tar.gz"; - sha256 = "0576fccng4nvmq5gma1nb1v00if5cwl81w4nv5zkb80q5wicn50c"; + sha256 = "sha256-y9yFMlN+loLxqT3bA0QEFrZpBqTMJd7Dy9c5QNGUvww="; }; postPatch = '' substituteInPlace cmake/FindOpenJPEG.cmake --replace openjpeg-2.1 ${openjpeg.incDir} ''; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake perl ]; - buildInputs = [ netcdf - openjpeg - libpng - gfortran - ]; - propagatedBuildInputs = optionals enablePython [ - pythonPackages.python - pythonPackages.numpy - ]; + buildInputs = [ + netcdf + openjpeg + libpng + gfortran + ]; - cmakeFlags = [ "-DENABLE_PYTHON=${if enablePython then "ON" else "OFF"}" - "-DENABLE_PNG=ON" - "-DENABLE_ECCODES_THREADS=${if enablePosixThreads then "ON" else "OFF"}" - "-DENABLE_ECCODES_OMP_THREADS=${if enableOpenMPThreads then "ON" else "OFF"}" - ]; + propagatedBuildInputs = lib.optionals enablePython [ + pythonPackages.python + pythonPackages.numpy + ]; + + cmakeFlags = [ + "-DENABLE_PYTHON=${if enablePython then "ON" else "OFF"}" + "-DENABLE_PNG=ON" + "-DENABLE_ECCODES_THREADS=${if enablePosixThreads then "ON" else "OFF"}" + "-DENABLE_ECCODES_OMP_THREADS=${if enableOpenMPThreads then "ON" else "OFF"}" + ]; doCheck = true; @@ -44,7 +56,7 @@ stdenv.mkDerivation rec { ctest -R "eccodes_t_(definitions|calendar|unit_tests|md5|uerra|grib_2nd_order_numValues|julian)" -VV ''; - meta = { + meta = with lib; { homepage = "https://confluence.ecmwf.int/display/ECC/"; license = licenses.asl20; maintainers = with maintainers; [ knedlsepp ];