2021-11-01 15:06:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils }:
|
2016-02-22 13:53:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nco";
|
2022-01-01 22:05:19 +00:00
|
|
|
version = "5.0.4";
|
2016-02-22 13:53:34 +00:00
|
|
|
|
2021-11-01 15:06:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nco";
|
|
|
|
repo = "nco";
|
2021-11-13 18:28:56 +00:00
|
|
|
rev = version;
|
2022-01-01 22:05:19 +00:00
|
|
|
sha256 = "sha256-hE3TSfZoKqiUEcLO+Q3xAjhyDPNqoq7+FGlKNpm8hjY=";
|
2016-02-22 13:53:34 +00:00
|
|
|
};
|
|
|
|
|
2021-11-08 09:12:55 +00:00
|
|
|
nativeBuildInputs = [ flex which antlr2 ];
|
|
|
|
|
|
|
|
buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-05-06 01:12:02 +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-09-26 05:14:35 +00:00
|
|
|
|
2021-11-08 09:12:55 +00:00
|
|
|
enableParallelBuilding = true;
|
2021-03-23 10:36:24 +00:00
|
|
|
|
2021-11-08 09:12:55 +00:00
|
|
|
meta = with lib; {
|
2016-02-23 14:07:18 +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";
|
2019-12-14 23:48:56 +00:00
|
|
|
homepage = "http://nco.sourceforge.net/";
|
2021-11-08 09:12:55 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bzizou ];
|
|
|
|
platforms = platforms.linux;
|
2016-02-22 13:53:34 +00:00
|
|
|
};
|
|
|
|
}
|