about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/afdko/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/afdko/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/afdko/default.nix21
1 files changed, 15 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/afdko/default.nix b/nixpkgs/pkgs/development/python-modules/afdko/default.nix
index 556261277ea0..1bd2b71d25fb 100644
--- a/nixpkgs/pkgs/development/python-modules/afdko/default.nix
+++ b/nixpkgs/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) [