2023-08-16 15:22:11 +00:00
|
|
|
{ antlr2
|
|
|
|
, coreutils
|
|
|
|
, curl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flex
|
|
|
|
, gsl
|
|
|
|
, lib
|
|
|
|
, libtool
|
|
|
|
, netcdf
|
|
|
|
, netcdfcxx4
|
|
|
|
, stdenv
|
|
|
|
, udunits
|
|
|
|
, which
|
|
|
|
}:
|
2016-02-22 13:53:34 +00:00
|
|
|
|
2023-08-16 15:19:39 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nco";
|
2023-12-05 21:17:22 +00:00
|
|
|
version = "5.1.9";
|
2016-02-22 13:53:34 +00:00
|
|
|
|
2021-11-01 15:06:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nco";
|
|
|
|
repo = "nco";
|
2023-08-16 15:19:39 +00:00
|
|
|
rev = finalAttrs.version;
|
2023-12-05 21:17:22 +00:00
|
|
|
hash = "sha256-D7WmJ53oK4craLx6PKAFA6Ue7wl5fRYPeEFeh78Kpdg=";
|
2016-02-22 13:53:34 +00:00
|
|
|
};
|
|
|
|
|
2023-08-16 15:22:11 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
antlr2
|
|
|
|
flex
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
coreutils
|
|
|
|
curl
|
|
|
|
gsl
|
|
|
|
netcdf
|
|
|
|
netcdfcxx4
|
|
|
|
udunits
|
|
|
|
];
|
2021-11-08 09:12:55 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2020-05-06 01:12:02 +00:00
|
|
|
substituteInPlace src/nco/nco_fl_utl.c \
|
|
|
|
--replace "/bin/cp" "${coreutils}/bin/cp"
|
2023-08-16 15:22:11 +00:00
|
|
|
|
2020-05-06 01:12:02 +00:00
|
|
|
substituteInPlace src/nco/nco_fl_utl.c \
|
|
|
|
--replace "/bin/mv" "${coreutils}/bin/mv"
|
|
|
|
'';
|
2020-09-26 05:14:35 +00:00
|
|
|
|
2022-12-03 18:02:29 +00:00
|
|
|
makeFlags = lib.optionals stdenv.isDarwin [ "LIBTOOL=${libtool}/bin/libtool" ];
|
|
|
|
|
2021-11-08 09:12:55 +00:00
|
|
|
enableParallelBuilding = true;
|
2021-03-23 10:36:24 +00:00
|
|
|
|
2023-08-16 15:22:11 +00:00
|
|
|
meta = {
|
2016-02-23 14:07:18 +00:00
|
|
|
description = "NetCDF Operator toolkit";
|
2023-01-21 21:41:12 +00:00
|
|
|
homepage = "https://nco.sourceforge.net/";
|
2023-08-16 15:22:11 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
longDescription = "The NCO (netCDF Operator) toolkit manipulates and analyzes data stored in netCDF-accessible formats, including DAP, HDF4, and HDF5";
|
|
|
|
maintainers = with lib.maintainers; [ bzizou ];
|
|
|
|
platforms = lib.platforms.unix;
|
2016-02-22 13:53:34 +00:00
|
|
|
};
|
2023-08-16 15:19:39 +00:00
|
|
|
})
|