1{ buildPythonPackage 2, lib 3, stdenv 4, libsixel 5}: 6 7buildPythonPackage rec { 8 version = libsixel.version; 9 pname = "libsixel"; 10 11 src = libsixel.src; 12 sourceRoot = "${src.name}/python"; 13 14 prePatch = '' 15 substituteInPlace libsixel/__init__.py --replace \ 16 'from ctypes.util import find_library' \ 17 'find_library = lambda _x: "${lib.getLib libsixel}/lib/libsixel${stdenv.hostPlatform.extensions.sharedLibrary}"' 18 ''; 19 20 # no tests 21 doCheck = false; 22 23 pythonImportsCheck = [ "libsixel" ]; 24 25 meta = with lib; { 26 description = "SIXEL graphics encoder/decoder implementation"; 27 homepage = "https://github.com/libsixel/libsixel"; 28 license = licenses.mit; 29 maintainers = with maintainers; [ rmcgibbo ]; 30 }; 31}