diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-06-19 13:35:42 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-06-24 12:18:22 +0200 |
commit | 498afdfa16783cc7a18d40fde833d9bc9ff77938 (patch) | |
tree | ddc027520952f06af0e99c6e1d8beadcd34f13df /pkgs/tools/misc | |
parent | 0b94b05e64e5d36aec21e85d2235c9f5f8eed038 (diff) |
fontforge: fix build with Python 3.12
Replaces distutils usage with direct calls to the native sysconfig module.
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/fontforge/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/misc/fontforge/replace-distutils.patch | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/tools/misc/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index aed9b33584b66..fe626a417ab39 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -29,6 +29,9 @@ stdenv.mkDerivation rec { url = "https://github.com/fontforge/fontforge/commit/216eb14b558df344b206bf82e2bdaf03a1f2f429.patch"; hash = "sha256-aRnir09FSQMT50keoB7z6AyhWAVBxjSQsTRvBzeBuHU="; }) + + # https://github.com/fontforge/fontforge/pull/5423 + ./replace-distutils.patch ]; # use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps diff --git a/pkgs/tools/misc/fontforge/replace-distutils.patch b/pkgs/tools/misc/fontforge/replace-distutils.patch new file mode 100644 index 0000000000000..99087c649021b --- /dev/null +++ b/pkgs/tools/misc/fontforge/replace-distutils.patch @@ -0,0 +1,13 @@ +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) |