Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
70 lines
1.3 KiB
Nix
70 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPlatform,
|
|
hostPlatform,
|
|
fetchurl,
|
|
bash,
|
|
tinycc,
|
|
gnumake,
|
|
gnused,
|
|
gnugrep,
|
|
}:
|
|
let
|
|
pname = "gnutar";
|
|
# >= 1.13 is incompatible with mes-libc
|
|
version = "1.12";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/tar/tar-${version}.tar.gz";
|
|
sha256 = "02m6gajm647n8l9a5bnld6fnbgdpyi4i3i83p7xcwv0kif47xhy6";
|
|
};
|
|
in
|
|
bash.runCommand "${pname}-${version}"
|
|
{
|
|
inherit pname version;
|
|
|
|
nativeBuildInputs = [
|
|
tinycc.compiler
|
|
gnumake
|
|
gnused
|
|
gnugrep
|
|
];
|
|
|
|
passthru.tests.get-version =
|
|
result:
|
|
bash.runCommand "${pname}-get-version-${version}" { } ''
|
|
${result}/bin/tar --version
|
|
mkdir $out
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "GNU implementation of the `tar' archiver";
|
|
homepage = "https://www.gnu.org/software/tar";
|
|
license = licenses.gpl3Plus;
|
|
teams = [ teams.minimal-bootstrap ];
|
|
mainProgram = "tar";
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|
|
''
|
|
# Unpack
|
|
ungz --file ${src} --output tar.tar
|
|
untar --file tar.tar
|
|
rm tar.tar
|
|
cd tar-${version}
|
|
|
|
# Configure
|
|
export CC="tcc -B ${tinycc.libs}/lib"
|
|
bash ./configure \
|
|
--build=${buildPlatform.config} \
|
|
--host=${hostPlatform.config} \
|
|
--disable-nls \
|
|
--prefix=$out
|
|
|
|
# Build
|
|
make AR="tcc -ar"
|
|
|
|
# Install
|
|
make install
|
|
''
|