uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
102
pkgs/development/python-modules/afdko/default.nix
Normal file
102
pkgs/development/python-modules/afdko/default.nix
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder
|
||||
, fonttools, defcon, lxml, fs, unicodedata2, zopfli, brotlipy, fontpens
|
||||
, brotli, fontmath, mutatormath, booleanoperations
|
||||
, ufoprocessor, ufonormalizer, psautohint, tqdm
|
||||
, setuptools-scm, scikit-build
|
||||
, cmake
|
||||
, antlr4_9
|
||||
, pytestCheckHook
|
||||
# Enables some expensive tests, useful for verifying an update
|
||||
, runAllTests ? false
|
||||
, afdko
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "afdko";
|
||||
version = "3.8.3";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0mplyla4zcai3qld7is7bl5wn2kzhp87w87yi13wpqnw06i6ij4b";
|
||||
};
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
scikit-build
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
antlr4_9.runtime.cpp
|
||||
];
|
||||
|
||||
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
|
||||
];
|
||||
|
||||
# setup.py will always (re-)execute cmake in buildPhase
|
||||
dontConfigure = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
booleanoperations
|
||||
fonttools
|
||||
lxml # fonttools[lxml], defcon[lxml] extra
|
||||
fs # fonttools[ufo] extra
|
||||
unicodedata2 # fonttools[unicode] extra
|
||||
brotlipy # fonttools[woff] extra
|
||||
zopfli # fonttools[woff] extra
|
||||
fontpens
|
||||
brotli
|
||||
defcon
|
||||
fontmath
|
||||
mutatormath
|
||||
ufoprocessor
|
||||
ufonormalizer
|
||||
psautohint
|
||||
tqdm
|
||||
];
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
preCheck = ''
|
||||
export PATH=$PATH:$out/bin
|
||||
|
||||
# Update tests to match ufinormalizer-0.6.1 expectations:
|
||||
# https://github.com/adobe-type-tools/afdko/issues/1418
|
||||
find tests -name layerinfo.plist -delete
|
||||
'';
|
||||
disabledTests = 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.isAarch64 || stdenv.hostPlatform.isRiscV) [
|
||||
# aarch64-only (?) failure, unknown reason so far
|
||||
# https://github.com/adobe-type-tools/afdko/issues/1425
|
||||
"test_spec"
|
||||
] ++ lib.optionals (stdenv.hostPlatform.isi686) [
|
||||
"test_type1mm_inputs"
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
fullTestsuite = afdko.override { runAllTests = true; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Adobe Font Development Kit for OpenType";
|
||||
homepage = "https://adobe-type-tools.github.io/afdko/";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
commit 72b0ab672d1080049431eeee07ae6d2556ae9e4a
|
||||
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 50deb781..81417971 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -196,9 +196,7 @@ def main():
|
||||
setup_requires=[
|
||||
'wheel',
|
||||
'setuptools_scm',
|
||||
- 'scikit-build',
|
||||
- 'cmake',
|
||||
- 'ninja'
|
||||
+ 'scikit-build'
|
||||
],
|
||||
tests_require=[
|
||||
'pytest',
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
commit 1ccbf21a67da0fdbaad881a1f5c2a4df915e8c57
|
||||
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 e9c8c08e..dc3a46da 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -36,11 +36,11 @@ 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.9.3)
|
||||
-include(ExternalAntlr4Cpp)
|
||||
+find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime)
|
||||
+set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER})
|
||||
|
||||
# sanitizer support
|
||||
# work around https://github.com/pypa/setuptools/issues/1928 with environment
|
||||
diff --git a/c/makeotf/lib/hotconv/CMakeLists.txt b/c/makeotf/lib/hotconv/CMakeLists.txt
|
||||
index 82257bf2..02eb2e30 100644
|
||||
--- a/c/makeotf/lib/hotconv/CMakeLists.txt
|
||||
+++ b/c/makeotf/lib/hotconv/CMakeLists.txt
|
||||
@@ -69,7 +69,7 @@ add_library(hotconv STATIC
|
||||
|
||||
set_property(TARGET hotconv PROPERTY C_STANDARD 99)
|
||||
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)
|
||||
|
||||
if ( CMAKE_COMPILER_IS_GNUCC )
|
||||
target_compile_options(hotconv PRIVATE -Wall -Wno-attributes)
|
||||
Loading…
Add table
Add a link
Reference in a new issue