nixpkgs/pkgs/development/python-modules/libsixel/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

33 lines
763 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 = {
description = "SIXEL graphics encoder/decoder implementation";
homepage = "https://github.com/libsixel/libsixel";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ rmcgibbo ];
};
}