Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 matplotlib, 6 numpy, 7 pillow, 8 pytestCheckHook, 9 pythonOlder, 10 setuptools, 11 tensorflow, 12 torch, 13 torchvision, 14}: 15 16buildPythonPackage rec { 17 pname = "imgcat"; 18 version = "0.5.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "wookayin"; 25 repo = "python-imgcat"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-LFXfCMWMdOjFYhXba9PCCIYnqR7gTRG63NAoC/nD2wk="; 28 }; 29 30 postPatch = '' 31 substituteInPlace setup.py \ 32 --replace-fail "'pytest-runner<5.0'" "" 33 ''; 34 35 build-system = [ setuptools ]; 36 37 nativeCheckInputs = [ 38 matplotlib 39 numpy 40 pillow 41 pytestCheckHook 42 tensorflow 43 torch 44 torchvision 45 ]; 46 47 pythonImportsCheck = [ "imgcat" ]; 48 49 meta = with lib; { 50 description = "Imgcat in Python"; 51 homepage = "https://github.com/wookayin/python-imgcat"; 52 changelog = "https://github.com/wookayin/python-imgcat/releases/tag/v${version}"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}