1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 poetry-core, 7 pytestCheckHook, 8 syrupy, 9 pillow, 10 rich, 11 pythonRelaxDepsHook, 12}: 13 14buildPythonPackage rec { 15 pname = "rich-pixels"; 16 version = "2.2.0"; 17 format = "pyproject"; 18 19 src = fetchFromGitHub { 20 owner = "darrenburns"; 21 repo = "rich-pixels"; 22 rev = version; 23 hash = "sha256-fbpnHEfBPWLSYhgETqKbdmmzt7Lu/4oKgetjgNvv04c="; 24 }; 25 26 patches = [ 27 (fetchpatch { 28 name = "fix-version.patch"; 29 url = "https://github.com/darrenburns/rich-pixels/commit/ff1cc3fef789321831f29e9bf282ae6b337eddb2.patch"; 30 hash = "sha256-58ZHBNg1RCuOfuE034qF1SbAgoiWMNlSG3c5pCSLUyI="; 31 }) 32 ]; 33 34 nativeBuildInputs = [ 35 poetry-core 36 pythonRelaxDepsHook 37 ]; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 checkInputs = [ syrupy ]; 42 43 propagatedBuildInputs = [ 44 pillow 45 rich 46 ]; 47 48 pythonRelaxDeps = [ "pillow" ]; 49 50 pythonImportsCheck = [ "rich_pixels" ]; 51 52 meta = with lib; { 53 description = "A Rich-compatible library for writing pixel images and ASCII art to the terminal"; 54 homepage = "https://github.com/darrenburns/rich-pixels"; 55 changelog = "https://github.com/darrenburns/rich-pixels/releases/tag/${src.rev}"; 56 license = licenses.mit; 57 maintainers = with maintainers; [ figsoda ]; 58 }; 59}