netcdffortran: fix build on darwin

This commit is contained in:
Dmitry Kalinkin 2021-12-23 16:35:36 -05:00
parent a85892edd7
commit a14356187f
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333
2 changed files with 6 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, gfortran }:
{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, gfortran, CoreFoundation }:
stdenv.mkDerivation rec {
pname = "netcdf-fortran";
version = "4.4.5";
@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ gfortran ];
buildInputs = [ netcdf hdf5 curl ];
buildInputs = [ netcdf hdf5 curl ]
++ lib.optional stdenv.isDarwin CoreFoundation;
doCheck = true;
meta = with lib; {

View file

@ -7948,7 +7948,9 @@ with pkgs;
netcdfcxx4 = callPackage ../development/libraries/netcdf-cxx4 { };
netcdffortran = callPackage ../development/libraries/netcdf-fortran { };
netcdffortran = callPackage ../development/libraries/netcdf-fortran {
inherit (darwin.apple_sdk.frameworks) CoreFoundation;
};
networking-ts-cxx = callPackage ../development/libraries/networking-ts-cxx { };