summary refs log tree commit diff
path: root/pkgs/development/python-modules/libsixel/default.nix
blob: 7760bb867479321e5cb8bc1bb9260855ad0c3404 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ buildPythonPackage
, lib
, libsixel
}:

buildPythonPackage rec {
  version = libsixel.version;
  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.so"'
  '';

  # 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 ];
  };
}