mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 01:23:03 +00:00
9588972fe9
Fixes the issue introduced in 3.9 and makes cmp and diff work past Y2K39
39 lines
1.3 KiB
Nix
39 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl, xz, coreutils ? null }:
|
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus
|
|
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
|
# cgit) that are needed here should be included directly in Nixpkgs as
|
|
# files.
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "diffutils";
|
|
version = "3.10";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/diffutils/diffutils-${version}.tar.xz";
|
|
hash = "sha256-kOXpPMck5OvhLt6A3xY0Bjx6hVaSaFkZv+YLVWyb0J4=";
|
|
};
|
|
|
|
outputs = [ "out" "info" ];
|
|
|
|
nativeBuildInputs = [ (lib.getBin xz) ];
|
|
/* If no explicit coreutils is given, use the one from stdenv. */
|
|
buildInputs = [ coreutils ];
|
|
|
|
configureFlags =
|
|
# "pr" need not be on the PATH as a run-time dep, so we need to tell
|
|
# configure where it is. Covers the cross and native case alike.
|
|
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 ];
|
|
};
|
|
}
|