2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
libsixel,
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
version = libsixel.version;
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-09-09 14:08:57 +00:00
|
|
|
pname = "libsixel";
|
|
|
|
|
|
|
|
src = libsixel.src;
|
|
|
|
sourceRoot = "${src.name}/python";
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace libsixel/__init__.py --replace \
|
|
|
|
'from ctypes.util import find_library' \
|
2023-07-15 17:15:38 +00:00
|
|
|
'find_library = lambda _x: "${lib.getLib libsixel}/lib/libsixel${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
2022-09-09 14:08:57 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "libsixel" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "SIXEL graphics encoder/decoder implementation";
|
|
|
|
homepage = "https://github.com/libsixel/libsixel";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rmcgibbo ];
|
|
|
|
};
|
|
|
|
}
|