netcdffortran: fix darwin build (#312683)

This commit is contained in:
Elian Doran 2024-05-19 07:19:36 +03:00 committed by GitHub
parent 68ead29211
commit 70e4cf2354
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, gfortran, CoreFoundation }:
{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, gfortran, CoreFoundation, CoreServices, SystemConfiguration }:
stdenv.mkDerivation rec {
pname = "netcdf-fortran";
version = "4.4.5";
@ -12,7 +12,15 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ gfortran ];
buildInputs = [ netcdf hdf5 curl ]
++ lib.optional stdenv.isDarwin CoreFoundation;
++ lib.optionals stdenv.isDarwin [
CoreFoundation
CoreServices
SystemConfiguration
];
env.NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [
"-F${CoreServices}/Library/Frameworks"
"-F${SystemConfiguration}/Library/Frameworks"
]);
doCheck = true;
FFLAGS = [ "-std=legacy" ];

View File

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