depot/third_party/nixpkgs/pkgs/development/libraries/nco/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

35 lines
1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils }:
stdenv.mkDerivation rec {
pname = "nco";
version = "5.0.3";
src = fetchFromGitHub {
owner = "nco";
repo = "nco";
rev = version;
sha256 = "sha256-KrFRBlD3z/sjKIvxmE0s/xCILQmESecilnlUGzDDICw=";
};
nativeBuildInputs = [ flex which antlr2 ];
buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ];
postPatch = ''
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"
'';
enableParallelBuilding = true;
meta = with lib; {
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/";
license = licenses.bsd3;
maintainers = with maintainers; [ bzizou ];
platforms = platforms.linux;
};
}