nco: change prePatch to postPatch, minor formatting
This commit is contained in:
parent
4a39bade89
commit
0c9bc761b9
1 changed files with 11 additions and 10 deletions
|
@ -1,32 +1,33 @@
|
||||||
{ lib, stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils }:
|
{ lib, stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "5.0.3";
|
|
||||||
pname = "nco";
|
pname = "nco";
|
||||||
|
version = "5.0.3";
|
||||||
nativeBuildInputs = [ flex which antlr2 ];
|
|
||||||
buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ];
|
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/nco/nco/archive/${version}.tar.gz";
|
url = "https://github.com/nco/nco/archive/${version}.tar.gz";
|
||||||
sha256 = "sha256-KrFRBlD3z/sjKIvxmE0s/xCILQmESecilnlUGzDDICw=";
|
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 \
|
substituteInPlace src/nco/nco_fl_utl.c \
|
||||||
--replace "/bin/cp" "${coreutils}/bin/cp"
|
--replace "/bin/cp" "${coreutils}/bin/cp"
|
||||||
substituteInPlace src/nco/nco_fl_utl.c \
|
substituteInPlace src/nco/nco_fl_utl.c \
|
||||||
--replace "/bin/mv" "${coreutils}/bin/mv"
|
--replace "/bin/mv" "${coreutils}/bin/mv"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
parallelBuild = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "NetCDF Operator toolkit";
|
description = "NetCDF Operator toolkit";
|
||||||
longDescription = "The NCO (netCDF Operator) toolkit manipulates and analyzes data stored in netCDF-accessible formats, including DAP, HDF4, and HDF5";
|
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/";
|
homepage = "http://nco.sourceforge.net/";
|
||||||
license = lib.licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = [ lib.maintainers.bzizou ];
|
maintainers = with maintainers; [ bzizou ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue