Unverified Commit 70e4cf23 authored by Elian Doran's avatar Elian Doran Committed by GitHub
Browse files

netcdffortran: fix darwin build (#312683)

parent 68ead292
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
{ 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" ];
+1 −1
Original line number Diff line number Diff line
@@ -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 { };