aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/nco/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/nco/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/nco/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/nco/default.nix b/nixpkgs/pkgs/development/libraries/nco/default.nix
index 321e4e0560d..629c064404b 100644
--- a/nixpkgs/pkgs/development/libraries/nco/default.nix
+++ b/nixpkgs/pkgs/development/libraries/nco/default.nix
@@ -1,17 +1,24 @@
-{ stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr, which, curl, flex }:
+{ stdenv, fetchzip, netcdf, netcdfcxx4, gsl, udunits, antlr, which, curl, flex, coreutils }:
stdenv.mkDerivation rec {
version = "4.9.2";
pname = "nco";
nativeBuildInputs = [ flex which ];
- buildInputs = [ netcdf netcdfcxx4 gsl udunits antlr curl ];
+ buildInputs = [ netcdf netcdfcxx4 gsl udunits antlr curl coreutils ];
src = fetchzip {
url = "https://github.com/nco/nco/archive/${version}.tar.gz";
sha256 = "0nip9dmdx3d5nc30bz1d2w9his1dph136l53r160aa3bmb29xwqn";
};
+ prePatch = ''
+ 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"
+ '';
+
meta = {
description = "NetCDF Operator toolkit";
longDescription = "The NCO (netCDF Operator) toolkit manipulates and analyzes data stored in netCDF-accessible formats, including DAP, HDF4, and HDF5";