mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 17:46:38 +01:00
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>
33 lines
763 B
Nix
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 ];
|
|
};
|
|
}
|