about summary refs log tree commit diff
path: root/pkgs/development/python-modules/libsixel/default.nix
blob: 37bf32f31fd61305da82dfab01966ac6b1d0382d (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
31
32
{ 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 ];
  };
}