From d17443fb12c5ea78ba1938325a9b1629684a3af6 Mon Sep 17 00:00:00 2001 From: Lin Xianyi Date: Wed, 29 Nov 2023 11:55:12 +0800 Subject: [PATCH] rclip: init at 1.7.6 --- pkgs/by-name/rc/rclip/package.nix | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/rc/rclip/package.nix diff --git a/pkgs/by-name/rc/rclip/package.nix b/pkgs/by-name/rc/rclip/package.nix new file mode 100644 index 000000000000..072c4ccafa05 --- /dev/null +++ b/pkgs/by-name/rc/rclip/package.nix @@ -0,0 +1,46 @@ +{ lib +, python3Packages +, fetchFromGitHub +}: +python3Packages.buildPythonApplication rec { + pname = "rclip"; + version = "1.7.6"; + pyproject = true; + + src = fetchFromGitHub { + owner = "yurijmikhalevich"; + repo = "rclip"; + rev = "v${version}"; + hash = "sha256-lWaWq+dcAa/2pONka4xRpixqDuL6iYDF46vCyCmVWwE="; + }; + + nativeBuildInputs = with python3Packages; [ + poetry-core + ]; + + propagatedBuildInputs = with python3Packages; [ + open-clip-torch + pillow + requests + torch + torchvision + tqdm + ]; + + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; + + 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"; + }; +}