2023-11-29 03:55:12 +00:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "rclip";
|
2024-05-07 22:33:36 +00:00
|
|
|
version = "1.8.10";
|
2023-11-29 03:55:12 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yurijmikhalevich";
|
|
|
|
repo = "rclip";
|
2024-05-07 22:33:36 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-wjwi6GBblv8Z3SA1bMrtPz3KVF8Zw5595Hqyp8FPgcg=";
|
2023-11-29 03:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
open-clip-torch
|
|
|
|
pillow
|
|
|
|
requests
|
|
|
|
torch
|
|
|
|
torchvision
|
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
|
2024-01-15 00:34:48 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [ pytestCheckHook pythonRelaxDepsHook ];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [ "torch" "torchvision" ];
|
2023-11-29 03:55:12 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "rclip" ];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# requires network
|
|
|
|
"tests/e2e/test_rclip.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "AI-Powered Command-Line Photo Search Tool";
|
|
|
|
homepage = "https://github.com/yurijmikhalevich/rclip";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ iynaix ];
|
|
|
|
mainProgram = "rclip";
|
|
|
|
};
|
|
|
|
}
|