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,53 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
flex,
bison,
texinfo,
help2man,
m4,
}:
stdenv.mkDerivation rec {
pname = "flex";
version = "2.5.35";
src = fetchurl {
url = "https://github.com/westes/flex/archive/flex-${
lib.replaceStrings [ "." ] [ "-" ] version
}.tar.gz";
sha256 = "0wh06nix8bd4w1aq4k2fbbkdq5i30a9lxz3xczf3ff28yy0kfwzm";
};
postPatch = ''
patchShebangs tests
'';
nativeBuildInputs = [
flex
bison
texinfo
help2man
autoreconfHook
];
propagatedBuildInputs = [ m4 ];
preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
'';
doCheck = false; # fails 2 out of 46 tests
meta = with lib; {
branch = "2.5.35";
homepage = "https://flex.sourceforge.net/";
description = "Fast lexical analyser generator";
mainProgram = "flex";
license = licenses.bsd2;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
buildPackages,
fetchurl,
bison,
m4,
autoreconfHook,
help2man,
}:
# Avoid 'fetchpatch' to allow 'flex' to be used as a possible 'gcc'
# dependency during bootstrap. Useful when gcc is built from snapshot
# or from a git tree (flex lexers are not pre-generated there).
stdenv.mkDerivation rec {
pname = "flex";
version = "2.6.4";
src = fetchurl {
url = "https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz";
sha256 = "15g9bv236nzi665p9ggqjlfn4dwck5835vf0bbw2cz7h5c1swyp8";
};
# Also upstream, will be part of 2.6.5
# https://github.com/westes/flex/commit/24fd0551333e
patches = [
(fetchurl {
name = "glibc-2.26.patch";
url = "https://raw.githubusercontent.com/lede-project/source/0fb14a2b1ab2f82ce63f4437b062229d73d90516/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch";
sha256 = "0mpp41zdg17gx30kcpj83jl8hssks3adbks0qzbhcz882b9c083r";
})
];
postPatch = ''
patchShebangs tests
''
+ lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace Makefile.in --replace "tests" " "
substituteInPlace doc/Makefile.am --replace 'flex.1: $(top_srcdir)/configure.ac' 'flex.1: '
'';
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
autoreconfHook
help2man
];
buildInputs = [ bison ];
propagatedBuildInputs = [ m4 ];
preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
'';
postConfigure = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isCygwin) ''
sed -i Makefile -e 's/-no-undefined//;'
'';
dontDisableStatic = stdenv.buildPlatform != stdenv.hostPlatform;
postInstall = ''
ln -s $out/bin/flex $out/bin/lex
'';
meta = with lib; {
homepage = "https://github.com/westes/flex";
description = "Fast lexical analyser generator";
license = licenses.bsd2;
platforms = platforms.unix;
};
}