python311Packages.afdko: 4.0.0 -> 4.0.0+unstable-2023-11-07

Fixes tests and some very questionable C code that was probably UB.
This commit is contained in:
K900
2024-01-08 18:53:32 +03:00
parent f1bd0e72c7
commit 9dbb6cc654
@@ -1,8 +1,7 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, fetchFromGitHub
, pythonOlder
, fonttools
, defcon
@@ -34,14 +33,16 @@
buildPythonPackage rec {
pname = "afdko";
version = "4.0.0";
version = "4.0.0+unstable-2023-11-07";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-66faoWBuCW0lQZP8/mBJLT+ErRGBl396HdG1RfPOYcM=";
src = fetchFromGitHub {
owner = "adobe-type-tools";
repo = pname;
rev = "6c832edbd81ecf689dbe66e840bf18ae61cf4bca";
hash = "sha256-XXkksHggUIs2O0/OSGsft8ofogcbtAa3w5JdldIAJAI=";
};
nativeBuildInputs = [
@@ -64,6 +65,11 @@ buildPythonPackage rec {
./use-dynamic-system-antlr4-runtime.patch
];
# Happy new year
postPatch = ''
substituteInPlace tests/tx_data/expected_output/alt-missing-glif.pfb --replace 2023 2024
'';
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (toString [
"-Wno-error=incompatible-function-pointer-types"
"-Wno-error=int-conversion"
@@ -98,6 +104,9 @@ buildPythonPackage rec {
preCheck = ''
export PATH=$PATH:$out/bin
# Remove build artifacts to prevent them from messing with the tests
rm -rf _skbuild
'';
disabledTests = lib.optionals (!runAllTests) [