From fe7fc2f3c1c32a75f246c48588d0b639dd3b442a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Aug 2023 13:47:00 +0000 Subject: [PATCH 1/3] nco: 5.1.6 -> 5.1.7 --- pkgs/development/libraries/nco/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nco/default.nix b/pkgs/development/libraries/nco/default.nix index 380f5d75d690..d2a101b878ec 100644 --- a/pkgs/development/libraries/nco/default.nix +++ b/pkgs/development/libraries/nco/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "nco"; - version = "5.1.6"; + version = "5.1.7"; src = fetchFromGitHub { owner = "nco"; repo = "nco"; rev = version; - sha256 = "sha256-h5HL3fe3pdj48UeL5TKunSr7PvKf26AOOOcQh77W9sk="; + sha256 = "sha256-CdIZ0ql8QBM7UcEyTmt4P9gZyO8jrkLipAOsJUkpG8g="; }; nativeBuildInputs = [ flex which antlr2 ]; From 691bc1965e80f92f8dea1ce4b5e5ac71262f9534 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 16 Aug 2023 17:19:39 +0200 Subject: [PATCH 2/3] nco: use `finalAttrs` pattern --- pkgs/development/libraries/nco/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/nco/default.nix b/pkgs/development/libraries/nco/default.nix index d2a101b878ec..ccba2b9c4942 100644 --- a/pkgs/development/libraries/nco/default.nix +++ b/pkgs/development/libraries/nco/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils, libtool }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "nco"; version = "5.1.7"; src = fetchFromGitHub { owner = "nco"; repo = "nco"; - rev = version; + rev = finalAttrs.version; sha256 = "sha256-CdIZ0ql8QBM7UcEyTmt4P9gZyO8jrkLipAOsJUkpG8g="; }; @@ -34,4 +34,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ bzizou ]; platforms = platforms.unix; }; -} +}) From 421ab83db634ed79b2bedc9484422141fa34aa21 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 16 Aug 2023 17:22:11 +0200 Subject: [PATCH 3/3] nco: minor refactoring and format using `nixpkgs-fmt` --- pkgs/development/libraries/nco/default.nix | 43 +++++++++++++++++----- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/nco/default.nix b/pkgs/development/libraries/nco/default.nix index ccba2b9c4942..585dd4072b27 100644 --- a/pkgs/development/libraries/nco/default.nix +++ b/pkgs/development/libraries/nco/default.nix @@ -1,4 +1,17 @@ -{ lib, stdenv, fetchFromGitHub, netcdf, netcdfcxx4, gsl, udunits, antlr2, which, curl, flex, coreutils, libtool }: +{ antlr2 +, coreutils +, curl +, fetchFromGitHub +, flex +, gsl +, lib +, libtool +, netcdf +, netcdfcxx4 +, stdenv +, udunits +, which +}: stdenv.mkDerivation (finalAttrs: { pname = "nco"; @@ -8,16 +21,28 @@ stdenv.mkDerivation (finalAttrs: { owner = "nco"; repo = "nco"; rev = finalAttrs.version; - sha256 = "sha256-CdIZ0ql8QBM7UcEyTmt4P9gZyO8jrkLipAOsJUkpG8g="; + hash = "sha256-CdIZ0ql8QBM7UcEyTmt4P9gZyO8jrkLipAOsJUkpG8g="; }; - nativeBuildInputs = [ flex which antlr2 ]; + nativeBuildInputs = [ + antlr2 + flex + which + ]; - buildInputs = [ netcdf netcdfcxx4 gsl udunits curl coreutils ]; + buildInputs = [ + coreutils + curl + gsl + netcdf + netcdfcxx4 + udunits + ]; 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" ''; @@ -26,12 +51,12 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; - meta = with lib; { + 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"; homepage = "https://nco.sourceforge.net/"; - license = licenses.bsd3; - maintainers = with maintainers; [ bzizou ]; - platforms = platforms.unix; + license = lib.licenses.bsd3; + longDescription = "The NCO (netCDF Operator) toolkit manipulates and analyzes data stored in netCDF-accessible formats, including DAP, HDF4, and HDF5"; + maintainers = with lib.maintainers; [ bzizou ]; + platforms = lib.platforms.unix; }; })