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,157 @@
{
lib,
stdenv,
# Enables some expensive tests, useful for verifying an update
afdko,
antlr4_13,
booleanoperations,
buildPythonPackage,
cmake,
defcon,
fetchFromGitHub,
fetchpatch,
fontmath,
fontpens,
fonttools,
libxml2,
mutatormath,
ninja,
pytestCheckHook,
pythonOlder,
runAllTests ? false,
scikit-build,
setuptools-scm,
tqdm,
ufonormalizer,
ufoprocessor,
}:
buildPythonPackage rec {
pname = "afdko";
version = "4.0.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "adobe-type-tools";
repo = "afdko";
tag = version;
hash = "sha256:0955dvbydifhgx9gswbf5drsmmghry7iyf6jwz6qczhj86clswcm";
};
build-system = [ setuptools-scm ];
nativeBuildInputs = [
scikit-build
cmake
ninja
];
buildInputs = [
antlr4_13.runtime.cpp
libxml2.dev
];
patches = [
# Don't try to install cmake and ninja using pip
./no-pypi-build-tools.patch
# Use antlr4 runtime from nixpkgs and link it dynamically
./use-dynamic-system-antlr4-runtime.patch
# Fix tests
# FIXME: remove in 5.0
(fetchpatch {
url = "https://github.com/adobe-type-tools/afdko/commit/3b78bea15245e2bd2417c25ba5c2b8b15b07793c.patch";
excludes = [
"CMakeLists.txt"
"requirements.txt"
];
hash = "sha256-Ao5AUVm1h4a3qidqlBFWdC7jiXyBfXQEnsT7XsXXXRU=";
})
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (toString [
"-Wno-error=incompatible-function-pointer-types"
"-Wno-error=int-conversion"
]);
# setup.py will always (re-)execute cmake in buildPhase
dontConfigure = true;
dependencies = [
booleanoperations
defcon
fontmath
fontpens
fonttools
mutatormath
tqdm
ufonormalizer
ufoprocessor
]
++ defcon.optional-dependencies.lxml
++ fonttools.optional-dependencies.lxml
++ fonttools.optional-dependencies.ufo
++ fonttools.optional-dependencies.unicode
++ fonttools.optional-dependencies.woff;
# Use system libxml2
FORCE_SYSTEM_LIBXML2 = true;
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
export PATH=$PATH:$out/bin
# Remove build artifacts to prevent them from messing with the tests
rm -rf _skbuild
'';
disabledTests = [
# broke in the fontforge 4.51 -> 4.53 update
"test_glyphs_2_7"
"test_hinting_data"
"test_waterfallplot"
# broke at some point
"test_type1_supported_hint"
]
++ lib.optionals (stdenv.cc.isGNU) [
# broke in the gcc 13 -> 14 update
"test_dump"
"test_input_formats"
"test_other_input_formats"
]
++ lib.optionals (!runAllTests) [
# Disable slow tests, reduces test time ~25 %
"test_report"
"test_post_overflow"
"test_cjk"
"test_extrapolate"
"test_filename_without_dir"
"test_overwrite"
"test_options"
]
++ lib.optionals (stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isRiscV) [
# unknown reason so far
# https://github.com/adobe-type-tools/afdko/issues/1425
"test_spec"
]
++ lib.optionals (stdenv.hostPlatform.isi686) [
"test_dump_option"
"test_type1mm_inputs"
];
passthru.tests = {
fullTestsuite = afdko.override { runAllTests = true; };
};
meta = with lib; {
description = "Adobe Font Development Kit for OpenType";
changelog = "https://github.com/adobe-type-tools/afdko/blob/${version}/NEWS.md";
homepage = "https://adobe-type-tools.github.io/afdko";
license = licenses.asl20;
maintainers = with maintainers; [ sternenseemann ];
};
}

View File

@@ -0,0 +1,24 @@
commit a5fde72bd15e0baba008ea54270a1ffe017544a0
Author: sternenseemann <sternenseemann@systemli.org>
Date: Tue Oct 5 18:17:20 2021 +0200
Don't use pypi distributions of build tools
We want to use regular cmake and ninja and not the pypi projects which
somehow wrap and vendor a version of the proper tool.
diff --git a/setup.py b/setup.py
index 973e2826..dba58766 100644
--- a/setup.py
+++ b/setup.py
@@ -198,9 +198,7 @@ def main():
setup_requires=[
'wheel',
'setuptools_scm',
- 'scikit-build',
- 'cmake',
- 'ninja'
+ 'scikit-build'
],
tests_require=[
'pytest',

View File

@@ -0,0 +1,53 @@
commit 3560653d5d52bf30a52ce971ecfe262b1a09d7a3
Author: sternenseemann <sternenseemann@systemli.org>
Date: Tue Oct 5 18:16:10 2021 +0200
Link against system antlr4 runtime, dynamically
Instead of cloning a antlr4 version from git, use the system one. Also
don't link it statically, but dynamically by default (the library is
called antlr4-runtime, not antlr4_static).
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88e9cfd0..3df902b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,11 +36,10 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# https://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip
# set(ANTLR4_ZIP_REPOSITORY "/path_to_antlr4_archive/a4.zip")
-add_definitions(-DANTLR4CPP_STATIC)
set(ANTLR4_WITH_STATIC_CRT OFF)
-# 4.9.3 is the latest ANTLR4 version
set(ANTLR4_TAG tags/4.13.2)
-include(ExternalAntlr4Cpp)
+find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime)
+set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER})
if (DEFINED ENV{FORCE_BUILD_LIBXML2})
diff --git a/c/makeotf/lib/cffread/CMakeLists.txt b/c/makeotf/lib/cffread/CMakeLists.txt
index 2990035f..fab25a77 100644
--- a/c/makeotf/lib/cffread/CMakeLists.txt
+++ b/c/makeotf/lib/cffread/CMakeLists.txt
@@ -8,6 +8,6 @@ if (${NEED_LIBXML2_DEPEND})
add_dependencies(makeotf_cffread ${LIBXML2_TARGET})
endif()
-target_link_libraries(makeotf_cffread PUBLIC antlr4_static)
+target_link_libraries(makeotf_cffread PUBLIC antlr4-runtime)
target_compile_definitions(makeotf_cffread PRIVATE $<$<CONFIG:Debug>:CFF_DEBUG=1> CFF_T13_SUPPORT=0)
diff --git a/c/makeotf/lib/hotconv/CMakeLists.txt b/c/makeotf/lib/hotconv/CMakeLists.txt
index 60e49458..ada728c0 100644
--- a/c/makeotf/lib/hotconv/CMakeLists.txt
+++ b/c/makeotf/lib/hotconv/CMakeLists.txt
@@ -70,7 +70,7 @@ add_library(hotconv STATIC
set_property(TARGET hotconv PROPERTY C_STANDARD 99)
set_property(TARGET hotconv PROPERTY CXX_STANDARD 17)
target_include_directories(hotconv PRIVATE AFTER $<$<COMPILE_LANGUAGE:CXX>:${ANTLR4_INCLUDE_DIRS}>)
-target_link_libraries(hotconv PUBLIC antlr4_static)
+target_link_libraries(hotconv PUBLIC antlr4-runtime)
target_link_libraries(hotconv PUBLIC ${CHOSEN_LIBXML2_LIBRARY})