summary refs log tree commit diff
path: root/pkgs/development/libraries/grib-api
diff options
context:
space:
mode:
authorc0bw3b <c0bw3b@users.noreply.github.com>2019-11-17 19:48:55 +0100
committerc0bw3b <c0bw3b@users.noreply.github.com>2019-11-20 19:46:13 +0100
commit652a178840a08527bfd41aa871820c66bd0b8c57 (patch)
tree27cecc65fb20ea1795ca23921a4d4ad60e848f3a /pkgs/development/libraries/grib-api
parent9aa62321ea9c2f7a355d4c549cf1f803c0283ca8 (diff)
downloadnixpkgs-652a178840a08527bfd41aa871820c66bd0b8c57.tar
nixpkgs-652a178840a08527bfd41aa871820c66bd0b8c57.tar.gz
nixpkgs-652a178840a08527bfd41aa871820c66bd0b8c57.tar.bz2
nixpkgs-652a178840a08527bfd41aa871820c66bd0b8c57.tar.lz
nixpkgs-652a178840a08527bfd41aa871820c66bd0b8c57.tar.xz
nixpkgs-652a178840a08527bfd41aa871820c66bd0b8c57.tar.zst
nixpkgs-652a178840a08527bfd41aa871820c66bd0b8c57.zip
grib-api: replace jasper with openjpeg
Diffstat (limited to 'pkgs/development/libraries/grib-api')
-rw-r--r--pkgs/development/libraries/grib-api/default.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/development/libraries/grib-api/default.nix b/pkgs/development/libraries/grib-api/default.nix
index 38243ce5a6d..0c9e4bf3156 100644
--- a/pkgs/development/libraries/grib-api/default.nix
+++ b/pkgs/development/libraries/grib-api/default.nix
@@ -1,5 +1,5 @@
-{ fetchurl, stdenv,
-  cmake, netcdf, gfortran, jasper, libpng,
+{ fetchurl, fetchpatch, stdenv,
+  cmake, netcdf, gfortran, libpng, openjpeg,
   enablePython ? false, pythonPackages }:
 
 stdenv.mkDerivation rec{
@@ -11,6 +11,13 @@ stdenv.mkDerivation rec{
     sha256 = "0qbj12ap7yy2rl1pq629chnss2jl73wxdj1lwzv0xp87r6z5qdfl";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://salsa.debian.org/science-team/grib-api/raw/debian/1.28.0-2/debian/patches/openjpeg2.patch";
+      sha256 = "05faxh51vlidiazxq1ssd3k4cjivk1adyn30k94mxqa1xnb2r2pc";
+    })
+  ];
+
   preConfigure = ''
     # Fix "no member named 'inmem_' in 'jas_image_t'"
     substituteInPlace "src/grib_jasper_encoding.c" --replace "image.inmem_    = 1;" ""
@@ -19,8 +26,8 @@ stdenv.mkDerivation rec{
   buildInputs = [ cmake
                   netcdf
                   gfortran
-                  jasper
                   libpng
+                  openjpeg
                 ] ++ stdenv.lib.optionals enablePython [
                   pythonPackages.python
                 ];
@@ -32,6 +39,7 @@ stdenv.mkDerivation rec{
   cmakeFlags = [ "-DENABLE_PYTHON=${if enablePython then "ON" else "OFF"}"
                  "-DENABLE_PNG=ON"
                  "-DENABLE_FORTRAN=ON"
+                 "-DOPENJPEG_INCLUDE_DIR=${openjpeg.dev}/include/${openjpeg.incDir}"
                ];
 
   enableParallelBuilding = true;
@@ -52,13 +60,15 @@ stdenv.mkDerivation rec{
     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";
+    description = "ECMWF Library for the GRIB file format -- DEPRECATED";
     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.
+
+      Please note: GRIB-API support is being discontinued at the end of 2018.
+      After which there will be no further releases. Please upgrade to ecCodes
     '';
     maintainers = with maintainers; [ knedlsepp ];
   };
 }
-