Skip to content

Commit 6319929

Browse files
authored
python3Packages.ttfautohint-py: fix loading some modules (#378514)
2 parents ab842f8 + f905e74 commit 6319929

File tree

1 file changed

+13
-4
lines changed
  • pkgs/development/python-modules/ttfautohint-py

1 file changed

+13
-4
lines changed

pkgs/development/python-modules/ttfautohint-py/default.nix

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ buildPythonPackage rec {
2323
hash = "sha256-NTog461RpyHKo/Qpicj3tflehaKj9LlZEN9qeCMM6JQ=";
2424
};
2525

26-
postPatch = ''
27-
substituteInPlace src/python/ttfautohint/__init__.py \
28-
--replace-fail 'find_library("ttfautohint")' '"${lib.getLib ttfautohint}/lib/libttfautohint${stdenv.hostPlatform.extensions.sharedLibrary}"'
29-
'';
26+
postPatch =
27+
''
28+
substituteInPlace src/python/ttfautohint/__init__.py \
29+
--replace-fail 'find_library("ttfautohint")' '"${lib.getLib ttfautohint}/lib/libttfautohint${stdenv.hostPlatform.extensions.sharedLibrary}"'
30+
''
31+
+ lib.optionalString stdenv.hostPlatform.isLinux ''
32+
substituteInPlace src/python/ttfautohint/memory.py \
33+
--replace-fail 'find_library("c")' '"${lib.getLib stdenv.cc.libc}/lib/libc.so.6"'
34+
'';
3035

3136
env.TTFAUTOHINTPY_BUNDLE_DLL = false;
3237

@@ -36,6 +41,10 @@ buildPythonPackage rec {
3641
distutils
3742
];
3843

44+
dependencies = [
45+
setuptools # for pkg_resources
46+
];
47+
3948
buildInputs = [ ttfautohint ];
4049

4150
nativeCheckInputs = [

0 commit comments

Comments
 (0)