nix-dotfiles/pkgs/python-rembg/default.nix
2025-03-22 11:21:03 -06:00

44 lines
859 B
Nix

{ lib,
python310Packages,
fetchPypi,
python-pymatting,
python-opencv-headless
}:
python310Packages.buildPythonPackage rec {
pname = "rembg";
version = "2.0.50";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-bMt/GbplRawFZUqoXq37zAq1dribnu/ZlIYTuUIS+DU=";
};
nativeBuildInputs = with python310Packages; [
poetry-core
setuptools
];
propagatedBuildInputs = with python310Packages; [
numpy
onnxruntime
python-opencv-headless
pillow
pooch
python-pymatting
scikit-image
scipy
tqdm
aiohttp
];
doCheck = false;
meta = with lib; {
description = "Tool to remove image backgrounds";
homepage = "https://github.com/danielgatis/rembg";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; ["Cobray"];
};
}