From 0c9bc761b916ddb1a4d33fd64f68c8eeaaaf9294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 Nov 2021 10:12:55 +0100 Subject: [PATCH] nco: change prePatch to postPatch, minor formatting --- pkgs/development/libraries/nco/default.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/nco/default.nix b/pkgs/development/libraries/nco/default.nix index dabb8e84bfbb..22267ea554de 100644 --- a/pkgs/development/libraries/nco/default.nix +++ b/pkgs/development/libraries/nco/default.nix @@ -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; }; }