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

78 lines
1.4 KiB
Nix

{
lib,
buildPlatform,
hostPlatform,
fetchurl,
bash,
tinycc,
gnumake,
gnused,
gnugrep,
gawk,
gnutar,
gzip,
}:
let
pname = "xz";
version = "5.4.3";
src = fetchurl {
url = "https://tukaani.org/xz/xz-${version}.tar.gz";
hash = "sha256-HDguC8Lk4K9YOYqQPdYv/35RAXHS3keh6+BtFSjpt+k=";
};
in
bash.runCommand "${pname}-${version}"
{
inherit pname version;
nativeBuildInputs = [
tinycc.compiler
gnumake
gnused
gnugrep
gawk
gnutar
gzip
];
passthru.tests.get-version =
result:
bash.runCommand "${pname}-get-version-${version}" { } ''
${result}/bin/xz --version
mkdir $out
'';
meta = with lib; {
description = "General-purpose data compression software, successor of LZMA";
homepage = "https://tukaani.org/xz";
license = with licenses; [
gpl2Plus
lgpl21Plus
];
teams = [ teams.minimal-bootstrap ];
platforms = platforms.unix;
};
}
''
# Unpack
tar xzf ${src}
cd xz-${version}
# Configure
export CC="tcc -B ${tinycc.libs}/lib"
export AR="tcc -ar"
export LD=tcc
bash ./configure \
--prefix=$out \
--build=${buildPlatform.config} \
--host=${hostPlatform.config} \
--disable-shared \
--disable-assembler
# Build
make -j $NIX_BUILD_CORES
# Install
make -j $NIX_BUILD_CORES install
''