From 147a5cda7299be628f34a336c5f2ade1c8b725b2 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 2 May 2021 00:46:35 +0100 Subject: netcdfcxx4: switch to CMake This resolves the Darwin linking issues Once and For All. Also, this makes the build parallel, which is nice too. --- pkgs/development/libraries/netcdf-cxx4/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/netcdf-cxx4/default.nix b/pkgs/development/libraries/netcdf-cxx4/default.nix index 4c9d294b784..494f4bf7157 100644 --- a/pkgs/development/libraries/netcdf-cxx4/default.nix +++ b/pkgs/development/libraries/netcdf-cxx4/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchzip, netcdf, hdf5, curl }: +{ lib, stdenv, fetchzip, netcdf, hdf5, curl, cmake, ninja }: stdenv.mkDerivation rec { pname = "netcdf-cxx4"; version = "4.3.1"; @@ -8,12 +8,15 @@ stdenv.mkDerivation rec { sha256 = "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"; }; - configureFlags = stdenv.lib.optionals stdenv.isDarwin [ - "--without-nc-config" - ]; # prevent linking failure on Darwin + preConfigure = '' + cmakeFlags+="-Dabs_top_srcdir=$(readlink -f ./)" + ''; + nativeBuildInputs = [ cmake ninja ]; buildInputs = [ netcdf hdf5 curl ]; + doCheck = true; + enableParallelChecking = false; meta = { description = "C++ API to manipulate netcdf files"; -- cgit 1.4.1