Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, gfortran, CoreFoundation }:
2stdenv.mkDerivation rec {
3 pname = "netcdf-fortran";
4 version = "4.4.5";
5
6 src = fetchFromGitHub {
7 owner = "Unidata";
8 repo = "netcdf-fortran";
9 rev = "v${version}";
10 sha256 = "sha256-nC93NcA4VJbrqaLwyhjP10j/t6rQSYcAzKBxclpZVe0=";
11 };
12
13 nativeBuildInputs = [ gfortran ];
14 buildInputs = [ netcdf hdf5 curl ]
15 ++ lib.optional stdenv.isDarwin CoreFoundation;
16 doCheck = true;
17
18 FFLAGS = [ "-std=legacy" ];
19 FCFLAGS = [ "-std=legacy" ];
20
21 meta = with lib; {
22 description = "Fortran API to manipulate netcdf files";
23 homepage = "https://www.unidata.ucar.edu/software/netcdf/";
24 license = licenses.free;
25 maintainers = [ maintainers.bzizou ];
26 platforms = platforms.unix;
27 };
28}