ocrmypdf: fix patching of leptonica lib path

This commit is contained in:
Will Dietz 2020-01-12 17:24:59 -06:00
parent 1cab2551b9
commit 24c14a8fc9
No known key found for this signature in database
GPG key ID: EBB0EA4124809D02

View file

@ -70,8 +70,8 @@ in buildPythonApplication rec {
postPatch = ''
substituteInPlace src/ocrmypdf/leptonica.py \
--replace "lept = ffi.dlopen(_libpath)" \
'lept = ffi.dlopen("${stdenv.lib.makeLibraryPath [leptonica]}/liblept${stdenv.hostPlatform.extensions.sharedLibrary}")'
--replace '_libpath = find_library(libname)' \
'_libpath = "${stdenv.lib.getLib leptonica}/lib/liblept${stdenv.hostPlatform.extensions.sharedLibrary}"'
'';
# The tests take potentially 20+ minutes, depending on machine