diff options
author | Janne Heß <janne@hess.ooo> | 2023-05-21 23:33:11 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2023-05-21 23:33:11 +0200 |
commit | 9588972fe983654d05df0695899bc96c46c622f9 (patch) | |
tree | 02b1e97d440bc13cd701cf69db9a78d0bdb41dae | |
parent | fe05fe6f645e2e8799b0f8d4630bfd1d060e36a8 (diff) | |
download | nixpkgs-9588972fe983654d05df0695899bc96c46c622f9.tar nixpkgs-9588972fe983654d05df0695899bc96c46c622f9.tar.gz nixpkgs-9588972fe983654d05df0695899bc96c46c622f9.tar.bz2 nixpkgs-9588972fe983654d05df0695899bc96c46c622f9.tar.lz nixpkgs-9588972fe983654d05df0695899bc96c46c622f9.tar.xz nixpkgs-9588972fe983654d05df0695899bc96c46c622f9.tar.zst nixpkgs-9588972fe983654d05df0695899bc96c46c622f9.zip |
diffutils: 3.9 -> 3.10
Fixes the issue introduced in 3.9 and makes cmp and diff work past Y2K39
-rw-r--r-- | pkgs/tools/text/diffutils/default.nix | 21 | ||||
-rw-r--r-- | pkgs/tools/text/diffutils/fix-diff-D.patch | 15 |
2 files changed, 6 insertions, 30 deletions
diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index fb0a95c49e1..7b2660a7114 100644 --- a/pkgs/tools/text/diffutils/default.nix +++ b/pkgs/tools/text/diffutils/default.nix @@ -7,28 +7,16 @@ stdenv.mkDerivation rec { pname = "diffutils"; - version = "3.9"; + version = "3.10"; src = fetchurl { url = "mirror://gnu/diffutils/diffutils-${version}.tar.xz"; - hash = "sha256-2A076QogGGjeg9eNrTQTrYgWDMU7zDbrnq98INvwI/E="; + hash = "sha256-kOXpPMck5OvhLt6A3xY0Bjx6hVaSaFkZv+YLVWyb0J4="; }; - patches = [ - # Backport of a fix for 'diff -D' output. - # TODO: remove when updating to 3.10. - ./fix-diff-D.patch - ]; - - postPatch = '' - # avoid the need for help2man - # TODO: can be removed when fix-diff-D.patch is removed. - touch man/diff.1 - ''; - outputs = [ "out" "info" ]; - nativeBuildInputs = [ xz.bin ]; + nativeBuildInputs = [ (lib.getBin xz) ]; /* If no explicit coreutils is given, use the one from stdenv. */ buildInputs = [ coreutils ]; @@ -38,10 +26,13 @@ stdenv.mkDerivation rec { lib.optional (coreutils != null) "PR_PROGRAM=${coreutils}/bin/pr" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "gl_cv_func_getopt_gnu=yes"; + doCheck = true; + meta = with lib; { homepage = "https://www.gnu.org/software/diffutils/diffutils.html"; description = "Commands for showing the differences between files (diff, cmp, etc.)"; license = licenses.gpl3; platforms = platforms.unix; + maintainers = with maintainers; [ das_j ]; }; } diff --git a/pkgs/tools/text/diffutils/fix-diff-D.patch b/pkgs/tools/text/diffutils/fix-diff-D.patch deleted file mode 100644 index 616f0927914..00000000000 --- a/pkgs/tools/text/diffutils/fix-diff-D.patch +++ /dev/null @@ -1,15 +0,0 @@ -https://git.savannah.gnu.org/cgit/diffutils.git/patch/?id=ba08fbbb0ca5da455bf695236c57bc50e7faed50 -https://github.com/NixOS/nixpkgs/pull/213421#issuecomment-1407749912 - -Fix 'diff -D' regression ---- a/src/diff.c -+++ b/src/diff.c -@@ -416,7 +416,7 @@ main (int argc, char **argv) - char *base = b; - int changes = 0; - -- for (i = 0; i < sizeof sizeof C_ifdef_group_formats; i++) -+ for (i = 0; i < sizeof C_ifdef_group_formats; i++) - { - char ch = C_ifdef_group_formats[i]; - switch (ch) |