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
66 lines
1.1 KiB
Nix
66 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPlatform,
|
|
hostPlatform,
|
|
fetchurl,
|
|
bash,
|
|
tinycc,
|
|
gnumake,
|
|
gnugrep,
|
|
gnused,
|
|
gnutar,
|
|
gzip,
|
|
bootGawk,
|
|
}:
|
|
let
|
|
inherit (import ./common.nix { inherit lib; }) meta;
|
|
pname = "gawk";
|
|
version = "5.2.2";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/gawk/gawk-${version}.tar.gz";
|
|
hash = "sha256-lFrvfM/xAfILIqEIArwAXplKsrjqPnJMwaGXxi9B9lA=";
|
|
};
|
|
in
|
|
bash.runCommand "${pname}-${version}"
|
|
{
|
|
inherit pname version meta;
|
|
|
|
nativeBuildInputs = [
|
|
tinycc.compiler
|
|
gnumake
|
|
gnused
|
|
gnugrep
|
|
gnutar
|
|
gzip
|
|
bootGawk
|
|
];
|
|
|
|
passthru.tests.get-version =
|
|
result:
|
|
bash.runCommand "${pname}-get-version-${version}" { } ''
|
|
${result}/bin/awk --version
|
|
mkdir $out
|
|
'';
|
|
}
|
|
''
|
|
# Unpack
|
|
tar xzf ${src}
|
|
cd gawk-${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}
|
|
|
|
# Build
|
|
make -j $NIX_BUILD_CORES
|
|
|
|
# Install
|
|
make -j $NIX_BUILD_CORES install
|
|
''
|