From 05bced1cf20fb76dcb371c80f337690797f5d0a9 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 2 Jan 2025 09:52:31 -0800 Subject: [PATCH] fontforge: use the upstream distutils removal patch --- pkgs/by-name/fo/fontforge/package.nix | 11 +++++++++-- pkgs/by-name/fo/fontforge/replace-distutils.patch | 13 ------------- 2 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 pkgs/by-name/fo/fontforge/replace-distutils.patch diff --git a/pkgs/by-name/fo/fontforge/package.nix b/pkgs/by-name/fo/fontforge/package.nix index e52b1ec8c9c1..7cd013033fc5 100644 --- a/pkgs/by-name/fo/fontforge/package.nix +++ b/pkgs/by-name/fo/fontforge/package.nix @@ -52,14 +52,21 @@ stdenv.mkDerivation rec { url = "https://github.com/fontforge/fontforge/commit/216eb14b558df344b206bf82e2bdaf03a1f2f429.patch"; hash = "sha256-aRnir09FSQMT50keoB7z6AyhWAVBxjSQsTRvBzeBuHU="; }) + + # Replace distutils use in the build script + (fetchpatch { + name = "replace-distutils.patch"; + url = "https://github.com/fontforge/fontforge/commit/8c75293e924602ed09a9481b0eeb67ba6c623a81.patch"; + includes = [ "pyhook/CMakeLists.txt" ]; + hash = "sha256-3CEwC8vygmCztKRmeD45aZIqyoj8yk5CLwxX2SGP7z4="; + }) + # Fixes translation compatibility with gettext 0.22 (fetchpatch { url = "https://github.com/fontforge/fontforge/commit/55d58f87ab1440f628f2071a6f6cc7ef9626c641.patch"; hash = "sha256-rkYnKPXA8Ztvh9g0zjG2yTUCPd3lE1uqwvBuEd8+Oyw="; }) - # https://github.com/fontforge/fontforge/pull/5423 - ./replace-distutils.patch ]; # use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps diff --git a/pkgs/by-name/fo/fontforge/replace-distutils.patch b/pkgs/by-name/fo/fontforge/replace-distutils.patch deleted file mode 100644 index 99087c649021..000000000000 --- a/pkgs/by-name/fo/fontforge/replace-distutils.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pyhook/CMakeLists.txt b/pyhook/CMakeLists.txt -index dd48054aa..710728f26 100644 ---- a/pyhook/CMakeLists.txt -+++ b/pyhook/CMakeLists.txt -@@ -21,7 +21,7 @@ target_link_libraries(psMat_pyhook PRIVATE Python3::Module) - # So do it ourselves, getting the prefix-relative path instead - if(NOT DEFINED PYHOOK_INSTALL_DIR) - execute_process( -- COMMAND "${Python3_EXECUTABLE}" -c "import distutils.sysconfig as sc; print(sc.get_python_lib(prefix='', plat_specific=True,standard_lib=False))" -+ COMMAND "${Python3_EXECUTABLE}" -c "import sysconfig; print(sysconfig.get_path('platlib', sysconfig.get_preferred_scheme('user'), vars={'userbase': '.'}))" - RESULT_VARIABLE _pyhook_install_dir_result - OUTPUT_VARIABLE PYHOOK_INSTALL_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE)