Merge pull request #234739 from natsukium/python3Packages.libsixel/fix-darwin

python3Packages.libsixel: fix build on darwin
This commit is contained in:
Weijia Wang 2023-05-29 11:59:46 +03:00 committed by GitHub
commit 64619daa54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
{ buildPythonPackage
, lib
, stdenv
, libsixel
}:
@ -13,7 +14,7 @@ buildPythonPackage rec {
prePatch = ''
substituteInPlace libsixel/__init__.py --replace \
'from ctypes.util import find_library' \
'find_library = lambda _x: "${lib.getLib libsixel}/lib/libsixel.so"'
'find_library = lambda _x: "${lib.getLib libsixel}/lib/libsixel${stdenv.hostPlatform.extensions.sharedLibrary}"'
'';
# no tests