Files
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

63 lines
1.1 KiB
Nix

{
lib,
fetchurl,
bash,
tinycc,
gnumake,
gnused,
gnugrep,
}:
let
pname = "gzip";
version = "1.2.4";
src = fetchurl {
url = "mirror://gnu/gzip/gzip-${version}.tar.gz";
sha256 = "0ryr5b00qz3xcdcv03qwjdfji8pasp0007ay3ppmk71wl8c1i90w";
};
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/gzip --version
mkdir $out
'';
meta = with lib; {
description = "GNU zip compression program";
homepage = "https://www.gnu.org/software/gzip";
license = licenses.gpl3Plus;
teams = [ teams.minimal-bootstrap ];
platforms = platforms.unix;
};
}
''
# Unpack
ungz --file ${src} --output gzip.tar
untar --file gzip.tar
rm gzip.tar
cd gzip-${version}
# Configure
export CC="tcc -B ${tinycc.libs}/lib -Dstrlwr=unused"
bash ./configure --prefix=$out
# Build
make
# Install
mkdir $out
make install
''