depot/third_party/nixpkgs/pkgs/development/python-modules/libsixel/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

33 lines
765 B
Nix

{
buildPythonPackage,
lib,
stdenv,
libsixel,
}:
buildPythonPackage rec {
version = libsixel.version;
format = "setuptools";
pname = "libsixel";
src = libsixel.src;
sourceRoot = "${src.name}/python";
prePatch = ''
substituteInPlace libsixel/__init__.py --replace \
'from ctypes.util import find_library' \
'find_library = lambda _x: "${lib.getLib libsixel}/lib/libsixel${stdenv.hostPlatform.extensions.sharedLibrary}"'
'';
# 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 ];
};
}