nco: change prePatch to postPatch, minor formatting

This commit is contained in:
Sandro Jäckel 2021-11-08 10:12:55 +01:00
parent 4a39bade89
commit 0c9bc761b9
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,32 +1,33 @@
{ lib, stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils }:
stdenv.mkDerivation rec {
version = "5.0.3";
pname = "nco";
nativeBuildInputs = [ flex which antlr2 ];
buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ];
version = "5.0.3";
src = fetchzip {
url = "https://github.com/nco/nco/archive/${version}.tar.gz";
sha256 = "sha256-KrFRBlD3z/sjKIvxmE0s/xCILQmESecilnlUGzDDICw=";
};
prePatch = ''
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"
'';
parallelBuild = true;
enableParallelBuilding = true;
meta = {
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 = lib.licenses.bsd3;
maintainers = [ lib.maintainers.bzizou ];
platforms = lib.platforms.linux;
license = licenses.bsd3;
maintainers = with maintainers; [ bzizou ];
platforms = platforms.linux;
};
}