Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / netcdf-cxx4 / default.nix
blob945eb219229ff99e963decbe9ba0884359226d8f
1 { lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, cmake, ninja }:
2 stdenv.mkDerivation rec {
3   pname = "netcdf-cxx4";
4   version = "4.3.1";
6   src = fetchFromGitHub {
7     owner = "Unidata";
8     repo = "netcdf-cxx4";
9     rev = "v${version}";
10     sha256 = "sha256-GZ6n7dW3l8Kqrk2Xp2mxRTUWWQj0XEd2LDTG9EtrfhY=";
11   };
13   patches = [
14     # This fix is included upstream, remove with next upgrade
15     ./cmake-h5free.patch
16   ];
18   preConfigure = ''
19     cmakeFlags+="-Dabs_top_srcdir=$(readlink -f ./)"
20   '';
22   nativeBuildInputs = [ cmake ninja ];
23   buildInputs = [ netcdf hdf5 curl ];
25   doCheck = true;
26   enableParallelChecking = false;
27   preCheck = ''
28     export HDF5_PLUGIN_PATH=${netcdf}/lib/hdf5-plugins
29   '';
31   meta = {
32     description = "C++ API to manipulate netcdf files";
33     homepage = "https://www.unidata.ucar.edu/software/netcdf/";
34     license = lib.licenses.free;
35     platforms = lib.platforms.unix;
36     broken = stdenv.isDarwin;
37   };