mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 00:33:10 +00:00
d0677e6d45
This adds a warning to the top of each “boot” package that reads: 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. This makes it clear to maintainer that they may need to treat this package a little differently than others. Importantly, we can’t use fetchpatch here due to using <nix/fetchurl.nix>. To avoid having stale hashes, we need to include patches that are subject to changing overtime (for instance, gitweb’s patches contain a version number at the bottom).
35 lines
1.2 KiB
Nix
35 lines
1.2 KiB
Nix
{ 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 {
|
|
name = "diffutils-3.7";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/diffutils/${name}.tar.xz";
|
|
sha256 = "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk";
|
|
};
|
|
|
|
outputs = [ "out" "info" ];
|
|
|
|
nativeBuildInputs = [ xz.bin ];
|
|
/* 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.
|
|
stdenv.lib.optional (coreutils != null) "PR_PROGRAM=${coreutils}/bin/pr"
|
|
++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "gl_cv_func_getopt_gnu=yes";
|
|
|
|
meta = with stdenv.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;
|
|
};
|
|
}
|