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