diff options
author | Luke Granger-Brown <git@lukegb.com> | 2021-05-02 00:46:35 +0100 |
---|---|---|
committer | Luke Granger-Brown <git@lukegb.com> | 2021-05-01 23:49:35 +0000 |
commit | 147a5cda7299be628f34a336c5f2ade1c8b725b2 (patch) | |
tree | a8bbceb4f255b5e3f2a91f46d9eaf240265a5f1d | |
parent | dfe5071b8233700daf163ade1792f8e62b45902b (diff) | |
download | nixpkgs-147a5cda7299be628f34a336c5f2ade1c8b725b2.tar nixpkgs-147a5cda7299be628f34a336c5f2ade1c8b725b2.tar.gz nixpkgs-147a5cda7299be628f34a336c5f2ade1c8b725b2.tar.bz2 nixpkgs-147a5cda7299be628f34a336c5f2ade1c8b725b2.tar.lz nixpkgs-147a5cda7299be628f34a336c5f2ade1c8b725b2.tar.xz nixpkgs-147a5cda7299be628f34a336c5f2ade1c8b725b2.tar.zst nixpkgs-147a5cda7299be628f34a336c5f2ade1c8b725b2.zip |
netcdfcxx4: switch to CMake
This resolves the Darwin linking issues Once and For All. Also, this makes the build parallel, which is nice too.
-rw-r--r-- | pkgs/development/libraries/netcdf-cxx4/default.nix | 11 |
1 files 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"; |