about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/eccodes
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/eccodes')
-rw-r--r--nixpkgs/pkgs/development/libraries/eccodes/default.nix57
1 files changed, 34 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/libraries/eccodes/default.nix b/nixpkgs/pkgs/development/libraries/eccodes/default.nix
index 1050490a220b..a528656fe464 100644
--- a/nixpkgs/pkgs/development/libraries/eccodes/default.nix
+++ b/nixpkgs/pkgs/development/libraries/eccodes/default.nix
@@ -1,39 +1,50 @@
-{ 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 gfortran perl ];
+
+  buildInputs = [
+    netcdf
+    openjpeg
+    libpng
+  ];
 
-  buildInputs = [ netcdf
-                  openjpeg
-                  libpng
-                  gfortran
-                ];
-  propagatedBuildInputs = optionals enablePython [
-                  pythonPackages.python
-                  pythonPackages.numpy
-                ];
+  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"}"
-               ];
+  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 +55,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 ];