python3Packages.ttfautohint-py: fix loading some modules (#378514)
This commit is contained in:
@@ -23,10 +23,15 @@ buildPythonPackage rec {
|
||||
hash = "sha256-NTog461RpyHKo/Qpicj3tflehaKj9LlZEN9qeCMM6JQ=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/python/ttfautohint/__init__.py \
|
||||
--replace-fail 'find_library("ttfautohint")' '"${lib.getLib ttfautohint}/lib/libttfautohint${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
||||
'';
|
||||
postPatch =
|
||||
''
|
||||
substituteInPlace src/python/ttfautohint/__init__.py \
|
||||
--replace-fail 'find_library("ttfautohint")' '"${lib.getLib ttfautohint}/lib/libttfautohint${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace src/python/ttfautohint/memory.py \
|
||||
--replace-fail 'find_library("c")' '"${lib.getLib stdenv.cc.libc}/lib/libc.so.6"'
|
||||
'';
|
||||
|
||||
env.TTFAUTOHINTPY_BUNDLE_DLL = false;
|
||||
|
||||
@@ -36,6 +41,10 @@ buildPythonPackage rec {
|
||||
distutils
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
setuptools # for pkg_resources
|
||||
];
|
||||
|
||||
buildInputs = [ ttfautohint ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
||||
Reference in New Issue
Block a user