2021-06-28 23:13:55 +00:00
|
|
|
{ lib, stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "5.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "nco";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [ flex which antlr2 ];
|
2021-03-23 19:22:30 +00:00
|
|
|
buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/nco/nco/archive/${version}.tar.gz";
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-Mdnko+0ZuMoKgBp//+rCVsbFJx90Tmrnal7FAmwIKEQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
prePatch = ''
|
|
|
|
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
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
parallelBuild = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
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-03-23 19:22:30 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ lib.maintainers.bzizou ];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|