depot/third_party/nixpkgs/pkgs/development/libraries/nco/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

37 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils, libtool }:
stdenv.mkDerivation rec {
pname = "nco";
version = "5.1.6";
src = fetchFromGitHub {
owner = "nco";
repo = "nco";
rev = version;
sha256 = "sha256-h5HL3fe3pdj48UeL5TKunSr7PvKf26AOOOcQh77W9sk=";
};
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"
'';
makeFlags = lib.optionals stdenv.isDarwin [ "LIBTOOL=${libtool}/bin/libtool" ];
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 = "https://nco.sourceforge.net/";
license = licenses.bsd3;
maintainers = with maintainers; [ bzizou ];
platforms = platforms.unix;
};
}