at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pillow, 7 requests, 8 urwid, 9 pytestCheckHook, 10}: 11 12buildPythonPackage rec { 13 pname = "term-image"; 14 version = "0.7.2"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "AnonymouX47"; 19 repo = "term-image"; 20 tag = "v${version}"; 21 hash = "sha256-uA04KHKLXW0lx1y5brpCDARLac4/C8VmVinVMkEtTdM="; 22 }; 23 24 build-system = [ 25 setuptools 26 ]; 27 28 dependencies = [ 29 requests 30 pillow 31 ]; 32 33 optional-dependencies = { 34 urwid = [ urwid ]; 35 }; 36 37 pythonRelaxDeps = [ "pillow" ]; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 ] 42 ++ optional-dependencies.urwid; 43 44 disabledTestPaths = [ 45 # test_url needs online access 46 "tests/test_image/test_url.py" 47 ]; 48 49 pythonImportsCheck = [ "term_image" ]; 50 51 meta = { 52 description = "Display images in the terminal with python"; 53 homepage = "https://github.com/AnonymouX47/term-image"; 54 changelog = "https://github.com/AnonymouX47/term-image/releases/tag/v${version}"; 55 license = lib.licenses.mit; 56 maintainers = with lib.maintainers; [ liff ]; 57 }; 58}