2023-08-22 20:05:09 +00:00
|
|
|
{ antlr2
|
|
|
|
, coreutils
|
|
|
|
, curl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flex
|
|
|
|
, gsl
|
|
|
|
, lib
|
|
|
|
, libtool
|
|
|
|
, netcdf
|
|
|
|
, netcdfcxx4
|
|
|
|
, stdenv
|
|
|
|
, udunits
|
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "nco";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "5.2.8";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nco";
|
|
|
|
repo = "nco";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = finalAttrs.version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-FTaXgBmDlQv75roeJo4dJyJCpzOj9ilJo2hdxDnyjno=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
antlr2
|
|
|
|
flex
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
coreutils
|
|
|
|
curl
|
|
|
|
gsl
|
|
|
|
netcdf
|
|
|
|
netcdfcxx4
|
|
|
|
udunits
|
|
|
|
];
|
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"
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
substituteInPlace src/nco/nco_fl_utl.c \
|
|
|
|
--replace "/bin/mv" "${coreutils}/bin/mv"
|
|
|
|
'';
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
makeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "LIBTOOL=${libtool}/bin/libtool" ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
enableParallelBuilding = true;
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "NetCDF Operator toolkit";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://nco.sourceforge.net/";
|
2023-08-22 20:05:09 +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;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
})
|