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,124 @@
{
lib,
stdenv,
fetchurl,
removeReferencesTo,
runtimeShellPackage,
texinfo,
interactive ? false,
readline,
autoreconfHook, # no-pma fix
/*
Test suite broke on:
stdenv.hostPlatform.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1
|| stdenv.hostPlatform.isDarwin # XXX: `locale' segfaults
|| stdenv.hostPlatform.isSunOS # XXX: `_backsmalls1' fails, locale stuff?
|| stdenv.hostPlatform.isFreeBSD
*/
doCheck ? (interactive && stdenv.hostPlatform.isLinux),
glibcLocales ? null,
locale ? null,
}:
assert (doCheck && stdenv.hostPlatform.isLinux) -> glibcLocales != null;
stdenv.mkDerivation rec {
pname = "gawk" + lib.optionalString interactive "-interactive";
version = "5.3.2";
src = fetchurl {
url = "mirror://gnu/gawk/gawk-${version}.tar.xz";
hash = "sha256-+MNIZQnecFGSE4sA7ywAu73Q6Eww1cB9I/xzqdxMycw=";
};
# PIE is incompatible with the "persistent malloc" ("pma") feature.
# While build system attempts to pass -no-pie to gcc. nixpkgs' `ld`
# wrapped still passes `-pie` flag to linker and breaks linkage.
# Let's disable "pie" until `ld` is fixed to do the right thing.
hardeningDisable = [ "pie" ];
# When we do build separate interactive version, it makes sense to always include man.
outputs = [
"out"
"info"
]
++ lib.optional (!interactive) "man";
strictDeps = true;
# no-pma fix
nativeBuildInputs = [
autoreconfHook
texinfo
]
++ lib.optionals interactive [
removeReferencesTo
]
++ lib.optionals (doCheck && stdenv.hostPlatform.isLinux) [
glibcLocales
];
buildInputs =
lib.optionals interactive [
runtimeShellPackage
readline
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
locale
];
configureFlags = [
(if interactive then "--with-readline=${readline.dev}" else "--without-readline")
];
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# TODO: figure out a better way to unbreak _NSGetExecutablePath invocations
NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
};
makeFlags = [
"AR=${stdenv.cc.targetPrefix}ar"
];
inherit doCheck;
postInstall =
(
if interactive then
''
remove-references-to -t "$NIX_CC" "$out"/bin/gawkbug
patchShebangs --host "$out"/bin/gawkbug
''
else
''
rm "$out"/bin/gawkbug
''
)
+ ''
rm "$out"/bin/gawk-*
ln -s gawk.1 "''${!outputMan}"/share/man/man1/awk.1
'';
meta = {
homepage = "https://www.gnu.org/software/gawk/";
description = "GNU implementation of the Awk programming language";
longDescription = ''
Many computer users need to manipulate text files: extract and then
operate on data from parts of certain lines while discarding the rest,
make changes in various text files wherever certain patterns appear,
and so on. To write a program to do these things in a language such as
C or Pascal is a time-consuming inconvenience that may take many lines
of code. The job is easy with awk, especially the GNU implementation:
Gawk.
The awk utility interprets a special-purpose programming language that
makes it possible to handle many data-reformatting jobs with just a few
lines of code.
'';
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix ++ lib.platforms.windows;
teams = [ lib.teams.helsinki-systems ];
mainProgram = "gawk";
};
}

View File

@@ -0,0 +1,62 @@
diff --git a/haru/pdf.c b/haru/pdf.c
index d16f573..3129427 100644
--- a/haru/pdf.c
+++ b/haru/pdf.c
@@ -105,7 +105,7 @@ static awk_scalar_t HPDF_CS_PATTERN_node;
/* LineCap */
static awk_scalar_t HPDF_BUTT_END_node;
static awk_scalar_t HPDF_ROUND_END_node;
-static awk_scalar_t HPDF_PROJECTING_SCUARE_END_node;
+static awk_scalar_t HPDF_PROJECTING_SQUARE_END_node;
/* _LineJoin */
static awk_scalar_t HPDF_MITER_JOIN_node;
@@ -248,7 +248,7 @@ static awk_scalar_t HPDF_ENCODER_UNKNOWN_node;
/* ByteType */
static awk_scalar_t HPDF_BYTE_TYPE_SINGLE_node;
static awk_scalar_t HPDF_BYTE_TYPE_LEAD_node;
-static awk_scalar_t HPDF_BYTE_TYPE_TRIAL_node;
+static awk_scalar_t HPDF_BYTE_TYPE_TRAIL_node;
static awk_scalar_t HPDF_BYTE_TYPE_UNKNOWN_node;
/* TextAlignment */
@@ -308,7 +308,7 @@ static const struct varinit varinit[] = {
ENTRY(HPDF_CS_PATTERN, 1)
ENTRY(HPDF_BUTT_END, 1)
ENTRY(HPDF_ROUND_END, 1)
- ENTRY(HPDF_PROJECTING_SCUARE_END, 1)
+ ENTRY(HPDF_PROJECTING_SQUARE_END, 1)
ENTRY(HPDF_MITER_JOIN, 1)
ENTRY(HPDF_ROUND_JOIN, 1)
ENTRY(HPDF_BEVEL_JOIN, 1)
@@ -417,7 +417,7 @@ static const struct varinit varinit[] = {
ENTRY(HPDF_ENCODER_UNKNOWN, 1)
ENTRY(HPDF_BYTE_TYPE_SINGLE, 1)
ENTRY(HPDF_BYTE_TYPE_LEAD, 1)
- ENTRY(HPDF_BYTE_TYPE_TRIAL, 1)
+ ENTRY(HPDF_BYTE_TYPE_TRAIL, 1)
ENTRY(HPDF_BYTE_TYPE_UNKNOWN, 1)
ENTRY(HPDF_TALIGN_LEFT, 1)
ENTRY(HPDF_TALIGN_RIGHT, 1)
diff --git a/haru/pdf.h b/haru/pdf.h
index a4ef39a..07cf168 100644
--- a/haru/pdf.h
+++ b/haru/pdf.h
@@ -86,7 +86,7 @@
#define DEFAULT_HPDF_BUTT_END HPDF_BUTT_END
#define DEFAULT_HPDF_ROUND_END HPDF_ROUND_END
-#define DEFAULT_HPDF_PROJECTING_SCUARE_END HPDF_PROJECTING_SCUARE_END
+#define DEFAULT_HPDF_PROJECTING_SQUARE_END HPDF_PROJECTING_SQUARE_END
/* _LineJoin */
#define DEFAULT_HPDF_MITER_JOIN HPDF_MITER_JOIN
@@ -229,7 +229,7 @@
/* ByteType */
#define DEFAULT_HPDF_BYTE_TYPE_SINGLE HPDF_BYTE_TYPE_SINGLE
#define DEFAULT_HPDF_BYTE_TYPE_LEAD HPDF_BYTE_TYPE_LEAD
-#define DEFAULT_HPDF_BYTE_TYPE_TRIAL HPDF_BYTE_TYPE_TRIAL
+#define DEFAULT_HPDF_BYTE_TYPE_TRAIL HPDF_BYTE_TYPE_TRAIL
#define DEFAULT_HPDF_BYTE_TYPE_UNKNOWN HPDF_BYTE_TYPE_UNKNOWN
/* TextAlignment */

View File

@@ -0,0 +1,20 @@
{
runCommand,
gawk,
extensions,
makeWrapper,
}:
runCommand "gawk-with-extensions"
{
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ gawk ] ++ extensions;
}
''
mkdir -p $out/bin
for i in ${gawk}/bin/*; do
name="$(basename "$i")"
makeWrapper $i $out/bin/$name \
--prefix AWKLIBPATH : "${gawk}/lib/gawk:''${AWKLIBPATH:-}"
done
''

View File

@@ -0,0 +1,221 @@
{
lib,
stdenv,
recurseIntoAttrs,
fetchgit,
pkg-config,
autoreconfHook,
autoconf,
automake,
libiconv,
libtool,
texinfo,
gettext,
gawk,
rapidjson,
gd,
libharu,
lmdb,
gmp,
glibcLocales,
mpfr,
more,
libpq,
hiredis,
expat,
tre,
}:
let
buildExtension = lib.makeOverridable (
{
name,
gawkextlib,
extraBuildInputs ? [ ],
doCheck ? true,
patches ? [ ],
extraPostPatch ? "",
env ? { },
broken ? null,
}:
let
is_extension = gawkextlib != null;
in
stdenv.mkDerivation rec {
pname = "gawkextlib-${name}";
version = "unstable-2022-10-20";
src = fetchgit {
url = "git://git.code.sf.net/p/gawkextlib/code";
rev = "f6c75b4ac1e0cd8d70c2f6c7a8d58b4d94cfde97";
sha256 = "sha256-0p3CrQ3TBl7UcveZytK/9rkAzn69RRM2GwY2eCeqlkg=";
};
inherit patches;
postPatch = ''
cd ${name}
''
+ extraPostPatch;
nativeBuildInputs = [
autoconf
automake
libtool
autoreconfHook
pkg-config
texinfo
gettext
];
buildInputs = [ gawk ] ++ extraBuildInputs;
propagatedBuildInputs = lib.optional is_extension gawkextlib;
setupHook = if is_extension then ./setup-hook.sh else null;
inherit gawk;
inherit env;
inherit doCheck;
nativeCheckInputs = [ more ];
meta = {
homepage = "https://sourceforge.net/projects/gawkextlib/";
description = "Dynamically loaded extension libraries for GNU AWK";
mainProgram = "xmlgawk";
longDescription = ''
The gawkextlib project provides several extension libraries for
gawk (GNU AWK), as well as libgawkextlib containing some APIs that
are useful for building gawk extension libraries. These libraries
enable gawk to process XML data, interact with a PostgreSQL
database, use the GD graphics library, and perform unlimited
precision MPFR calculations.
'';
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ tomberek ];
}
// lib.optionalAttrs (broken != null) { inherit broken; };
}
);
gawkextlib = buildExtension {
gawkextlib = null;
name = "lib";
};
libs = {
abort = buildExtension {
inherit gawkextlib;
name = "abort";
};
aregex = buildExtension {
inherit gawkextlib;
name = "aregex";
extraBuildInputs = [ tre ];
};
csv = buildExtension {
inherit gawkextlib;
name = "csv";
};
errno = buildExtension {
inherit gawkextlib;
name = "errno";
extraPostPatch = ''
substituteInPlace Makefile.am --replace-fail 'cpp -M' '${stdenv.cc.targetPrefix}cpp -M'
'';
};
gd = buildExtension {
inherit gawkextlib;
name = "gd";
extraBuildInputs = [ gd ];
# GCC 14 makes this an error by default, remove when fixed upstream
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
haru = buildExtension {
inherit gawkextlib;
name = "haru";
extraBuildInputs = [ libharu ];
patches = [
# Renames references to two identifiers with typos that libharu fixed in 2.4.4
# https://github.com/libharu/libharu/commit/88271b73c68c521a49a15e3555ef00395aa40810
./fix-typos-corrected-in-libharu-2.4.4.patch
];
# GCC 14 makes this an error by default, remove when fixed upstream
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
json = buildExtension {
inherit gawkextlib;
name = "json";
extraBuildInputs = [ rapidjson ];
};
lmdb = buildExtension {
inherit gawkextlib;
name = "lmdb";
extraPostPatch = ''
substituteInPlace Makefile.am --replace-fail 'cpp -M' '${stdenv.cc.targetPrefix}cpp -M'
'';
extraBuildInputs = [ lmdb ];
# mdb_env_open(env, /dev/null)
#! No such device
# mdb_env_open(env, /dev/null)
#! Operation not supported by device
doCheck = !stdenv.hostPlatform.isDarwin;
};
mbs = buildExtension {
inherit gawkextlib;
name = "mbs";
extraBuildInputs = [ glibcLocales ];
#! "spät": length: 5, mbs_length: 6, wcswidth: 4
doCheck = !stdenv.hostPlatform.isDarwin;
};
mpfr = buildExtension {
inherit gawkextlib;
name = "mpfr";
extraBuildInputs = [
gmp
mpfr
];
};
nl_langinfo = buildExtension {
inherit gawkextlib;
name = "nl_langinfo";
};
pgsql = buildExtension {
inherit gawkextlib;
name = "pgsql";
extraBuildInputs = [ libpq ];
};
redis = buildExtension {
inherit gawkextlib;
name = "redis";
extraBuildInputs = [ hiredis ];
};
select = buildExtension {
inherit gawkextlib;
name = "select";
extraPostPatch = ''
substituteInPlace Makefile.am --replace-fail 'cpp -M' '${stdenv.cc.targetPrefix}cpp -M'
'';
};
timex = buildExtension {
inherit gawkextlib;
name = "timex";
};
xml = buildExtension {
inherit gawkextlib;
name = "xml";
extraBuildInputs = [
expat
libiconv
];
# gawk: xmlbase:14: fatal: load_ext: cannot open library `../.libs/xml.so`
broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
};
};
in
recurseIntoAttrs (
libs
// {
inherit gawkextlib buildExtension;
full = builtins.attrValues libs;
}
)

View File

@@ -0,0 +1,6 @@
local oldOpts="-u"
shopt -qo nounset || oldOpts="+u"
set +u
. @gawk@/etc/profile.d/gawk.sh
gawklibpath_append @out@/lib/gawk
set "$oldOpts"