From 9dbb6cc654601658c33773206382f2db008a056a Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 7 Jan 2024 22:54:59 +0300 Subject: [PATCH] python311Packages.afdko: 4.0.0 -> 4.0.0+unstable-2023-11-07 Fixes tests and some very questionable C code that was probably UB. --- .../python-modules/afdko/default.nix | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/afdko/default.nix b/pkgs/development/python-modules/afdko/default.nix index 556261277ea0..1bd2b71d25fb 100644 --- a/pkgs/development/python-modules/afdko/default.nix +++ b/pkgs/development/python-modules/afdko/default.nix @@ -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) [