From 370300758a9d8ee92d5d90659371f75f9448c83d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 27 Sep 2019 13:02:14 -0700 Subject: [PATCH 1/4] netcdfcxx4: 4.3.0 -> 4.3.1 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/netcdf-cxx4/versions --- pkgs/development/libraries/netcdf-cxx4/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/netcdf-cxx4/default.nix b/pkgs/development/libraries/netcdf-cxx4/default.nix index b594a672140..d37979a07fc 100644 --- a/pkgs/development/libraries/netcdf-cxx4/default.nix +++ b/pkgs/development/libraries/netcdf-cxx4/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchurl, netcdf, hdf5, curl }: stdenv.mkDerivation rec { pname = "netcdf-cxx4"; - version = "4.3.0"; + version = "4.3.1"; src = fetchurl { url = "https://github.com/Unidata/netcdf-cxx4/archive/v${version}.tar.gz"; - sha256 = "13zi8cbk18gggx1c12a580wdsbl714lw68a1wg7c86x0sybirni5"; + sha256 = "1p4fjxxbrc0ra8kbs13d33p5zaqa4a6j1wavamr2f73cq0p3vzp3"; }; buildInputs = [ netcdf hdf5 curl ]; From 56858c2b92bcd038aa5718fa6e0ad72e7c8c9bb9 Mon Sep 17 00:00:00 2001 From: Renaud Date: Fri, 18 Oct 2019 18:21:45 +0200 Subject: [PATCH 2/4] netcdfcxx4: use fetchzip Github archives are not stable over time so fetchzip should be used instead of fetchurl --- pkgs/development/libraries/netcdf-cxx4/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/netcdf-cxx4/default.nix b/pkgs/development/libraries/netcdf-cxx4/default.nix index d37979a07fc..d0a69b202fe 100644 --- a/pkgs/development/libraries/netcdf-cxx4/default.nix +++ b/pkgs/development/libraries/netcdf-cxx4/default.nix @@ -1,11 +1,11 @@ -{ lib, stdenv, fetchurl, netcdf, hdf5, curl }: +{ lib, stdenv, fetchzip, netcdf, hdf5, curl }: stdenv.mkDerivation rec { pname = "netcdf-cxx4"; version = "4.3.1"; - src = fetchurl { + src = fetchzip { url = "https://github.com/Unidata/netcdf-cxx4/archive/v${version}.tar.gz"; - sha256 = "1p4fjxxbrc0ra8kbs13d33p5zaqa4a6j1wavamr2f73cq0p3vzp3"; + sha256 = "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"; }; buildInputs = [ netcdf hdf5 curl ]; From dfe5071b8233700daf163ade1792f8e62b45902b Mon Sep 17 00:00:00 2001 From: Renaud Date: Fri, 18 Oct 2019 19:33:16 +0200 Subject: [PATCH 3/4] netcdfcxx4: fix linking on Darwin --- pkgs/development/libraries/netcdf-cxx4/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/netcdf-cxx4/default.nix b/pkgs/development/libraries/netcdf-cxx4/default.nix index d0a69b202fe..4c9d294b784 100644 --- a/pkgs/development/libraries/netcdf-cxx4/default.nix +++ b/pkgs/development/libraries/netcdf-cxx4/default.nix @@ -8,6 +8,10 @@ stdenv.mkDerivation rec { sha256 = "05kydd5z9iil5iv4fp7l11cicda5n5lsg5sdmsmc55xpspnsg7hr"; }; + configureFlags = stdenv.lib.optionals stdenv.isDarwin [ + "--without-nc-config" + ]; # prevent linking failure on Darwin + buildInputs = [ netcdf hdf5 curl ]; doCheck = true; From 147a5cda7299be628f34a336c5f2ade1c8b725b2 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 2 May 2021 00:46:35 +0100 Subject: [PATCH 4/4] 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";