depot/third_party/nixpkgs/pkgs/development/python-modules/imgcat/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

56 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
matplotlib,
numpy,
pillow,
pytestCheckHook,
pythonOlder,
setuptools,
tensorflow,
torch,
torchvision,
}:
buildPythonPackage rec {
pname = "imgcat";
version = "0.5.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "wookayin";
repo = "python-imgcat";
rev = "refs/tags/v${version}";
hash = "sha256-LFXfCMWMdOjFYhXba9PCCIYnqR7gTRG63NAoC/nD2wk=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail "'pytest-runner<5.0'" ""
'';
build-system = [ setuptools ];
nativeCheckInputs = [
matplotlib
numpy
pillow
pytestCheckHook
tensorflow
torch
torchvision
];
pythonImportsCheck = [ "imgcat" ];
meta = with lib; {
description = "Imgcat in Python";
homepage = "https://github.com/wookayin/python-imgcat";
changelog = "https://github.com/wookayin/python-imgcat/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}