2022-12-17 10:02:37 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils, libtool }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nco";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "5.0.6";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nco";
|
|
|
|
repo = "nco";
|
|
|
|
rev = version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-LmxHgSBBqXK5M4KOthd8R+H5EY3O5lueb2gnw5mK8Xw=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [ flex which antlr2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
substituteInPlace src/nco/nco_fl_utl.c \
|
|
|
|
--replace "/bin/cp" "${coreutils}/bin/cp"
|
|
|
|
substituteInPlace src/nco/nco_fl_utl.c \
|
|
|
|
--replace "/bin/mv" "${coreutils}/bin/mv"
|
|
|
|
'';
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
makeFlags = lib.optionals stdenv.isDarwin [ "LIBTOOL=${libtool}/bin/libtool" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
enableParallelBuilding = true;
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "NetCDF Operator toolkit";
|
|
|
|
longDescription = "The NCO (netCDF Operator) toolkit manipulates and analyzes data stored in netCDF-accessible formats, including DAP, HDF4, and HDF5";
|
|
|
|
homepage = "http://nco.sourceforge.net/";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bzizou ];
|
2022-12-17 10:02:37 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|