2024-06-05 15:53:02 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, gfortran, CoreFoundation, CoreServices, SystemConfiguration }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "netcdf-fortran";
|
|
|
|
version = "4.4.5";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Unidata";
|
|
|
|
repo = "netcdf-fortran";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-nC93NcA4VJbrqaLwyhjP10j/t6rQSYcAzKBxclpZVe0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
nativeBuildInputs = [ gfortran ];
|
2021-12-26 17:43:05 +00:00
|
|
|
buildInputs = [ netcdf hdf5 curl ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-05 15:53:02 +00:00
|
|
|
CoreFoundation
|
|
|
|
CoreServices
|
|
|
|
SystemConfiguration
|
|
|
|
];
|
2024-09-26 11:04:55 +00:00
|
|
|
env.NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-05 15:53:02 +00:00
|
|
|
"-F${CoreServices}/Library/Frameworks"
|
|
|
|
"-F${SystemConfiguration}/Library/Frameworks"
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
FFLAGS = [ "-std=legacy" ];
|
|
|
|
FCFLAGS = [ "-std=legacy" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fortran API to manipulate netcdf files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nf-config";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.unidata.ucar.edu/software/netcdf/";
|
|
|
|
license = licenses.free;
|
|
|
|
maintainers = [ maintainers.bzizou ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|