37b28b8958
By default, stdenv runs configure using --disable-dependency-tracking. This commit adds the same flag to most manual invocations of autotools configure scripts in minimal-bootstrap. However, the flag does not apply to musl & zlib, which come with handwritten configure scripts. It also does not apply to Python, where the dependency tracking feature is already disabled in automake config.
77 lines
1.5 KiB
Nix
77 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPlatform,
|
|
hostPlatform,
|
|
fetchurl,
|
|
bash,
|
|
tinycc,
|
|
gnumake,
|
|
gnugrep,
|
|
gnused,
|
|
gawk,
|
|
gnutar,
|
|
xz,
|
|
}:
|
|
let
|
|
pname = "diffutils";
|
|
# last version that can be built by tinycc-musl 0.9.27
|
|
version = "3.8";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/diffutils/diffutils-${version}.tar.xz";
|
|
hash = "sha256-pr3X0bMSZtEcT03mwbdI1GB6sCMa9RiPwlM9CuJDj+w=";
|
|
};
|
|
in
|
|
bash.runCommand "${pname}-${version}"
|
|
{
|
|
inherit pname version;
|
|
|
|
nativeBuildInputs = [
|
|
tinycc.compiler
|
|
gnumake
|
|
gnused
|
|
gnugrep
|
|
gawk
|
|
gnutar
|
|
xz
|
|
];
|
|
|
|
passthru.tests.get-version =
|
|
result:
|
|
bash.runCommand "${pname}-get-version-${version}" { } ''
|
|
${result}/bin/diff --version
|
|
mkdir $out
|
|
'';
|
|
|
|
meta = {
|
|
description = "Commands for showing the differences between files (diff, cmp, etc.)";
|
|
homepage = "https://www.gnu.org/software/diffutils/diffutils.html";
|
|
license = lib.licenses.gpl3Only;
|
|
teams = [ lib.teams.minimal-bootstrap ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|
|
''
|
|
# Unpack
|
|
cp ${src} diffutils.tar.xz
|
|
unxz diffutils.tar.xz
|
|
tar xf diffutils.tar
|
|
rm diffutils.tar
|
|
cd diffutils-${version}
|
|
|
|
# Configure
|
|
export CC="tcc -B ${tinycc.libs}/lib"
|
|
export LD=tcc
|
|
bash ./configure \
|
|
--prefix=$out \
|
|
--build=${buildPlatform.config} \
|
|
--host=${hostPlatform.config} \
|
|
--disable-dependency-tracking
|
|
|
|
# Build
|
|
make -j $NIX_BUILD_CORES AR="tcc -ar"
|
|
|
|
# Install
|
|
make -j $NIX_BUILD_CORES install
|
|
''
|