push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{ lib }:
{
meta = with lib; {
description = "GNU implementation of the Awk programming language";
homepage = "https://www.gnu.org/software/gawk";
license = licenses.gpl3Plus;
teams = [ teams.minimal-bootstrap ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,65 @@
{
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
''

View File

@@ -0,0 +1,74 @@
{
lib,
buildPlatform,
hostPlatform,
fetchurl,
bash,
tinycc,
gnumake,
gnupatch,
gnused,
gnugrep,
}:
let
inherit (import ./common.nix { inherit lib; }) meta;
pname = "gawk-mes";
# >=3.1.x is incompatible with mes-libc
version = "3.0.6";
src = fetchurl {
url = "mirror://gnu/gawk/gawk-${version}.tar.gz";
sha256 = "1z4bibjm7ldvjwq3hmyifyb429rs2d9bdwkvs0r171vv1khpdwmb";
};
patches = [
# for reproducibility don't generate date stamp
./no-stamp.patch
];
in
bash.runCommand "${pname}-${version}"
{
inherit pname version meta;
nativeBuildInputs = [
tinycc.compiler
gnumake
gnupatch
gnused
gnugrep
];
passthru.tests.get-version =
result:
bash.runCommand "${pname}-get-version-${version}" { } ''
${result}/bin/awk --version
mkdir $out
'';
}
''
# Unpack
ungz --file ${src} --output gawk.tar
untar --file gawk.tar
rm gawk.tar
cd gawk-${version}
# Patch
${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches}
# Configure
export CC="tcc -B ${tinycc.libs}/lib"
export ac_cv_func_getpgrp_void=yes
export ac_cv_func_tzset=yes
bash ./configure \
--build=${buildPlatform.config} \
--host=${hostPlatform.config} \
--disable-nls \
--prefix=$out
# Build
make gawk
# Install
install -D gawk $out/bin/gawk
ln -s gawk $out/bin/awk
''

View File

@@ -0,0 +1,10 @@
--- configure
+++ configure
@@ -3676,7 +3676,6 @@ cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
-date > stamp-h
exit 0
EOF
chmod +x $CONFIG_STATUS