Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 64 lines 1.3 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 # Override the overly strict `tool.pytest.ini_options.filterwarnings` 25 postPatch = '' 26 substituteInPlace pyproject.toml \ 27 --replace-fail '"error"' '#"error"' 28 ''; 29 30 build-system = [ 31 setuptools 32 ]; 33 34 dependencies = [ 35 requests 36 pillow 37 ]; 38 39 optional-dependencies = { 40 urwid = [ urwid ]; 41 }; 42 43 pythonRelaxDeps = [ "pillow" ]; 44 45 nativeCheckInputs = [ 46 pytestCheckHook 47 ] 48 ++ optional-dependencies.urwid; 49 50 disabledTestPaths = [ 51 # test_url needs online access 52 "tests/test_image/test_url.py" 53 ]; 54 55 pythonImportsCheck = [ "term_image" ]; 56 57 meta = { 58 description = "Display images in the terminal with python"; 59 homepage = "https://github.com/AnonymouX47/term-image"; 60 changelog = "https://github.com/AnonymouX47/term-image/releases/tag/v${version}"; 61 license = lib.licenses.mit; 62 maintainers = with lib.maintainers; [ liff ]; 63 }; 64}