diff --git a/pkgs/by-name/rc/rclip/package.nix b/pkgs/by-name/rc/rclip/package.nix index 2f9aad6497a0..64275a277f22 100644 --- a/pkgs/by-name/rc/rclip/package.nix +++ b/pkgs/by-name/rc/rclip/package.nix @@ -1,38 +1,45 @@ -{ lib -, python3Packages -, fetchFromGitHub +{ + lib, + python3Packages, + fetchFromGitHub, }: python3Packages.buildPythonApplication rec { pname = "rclip"; - version = "1.10.3"; + version = "1.11.0"; pyproject = true; src = fetchFromGitHub { owner = "yurijmikhalevich"; repo = "rclip"; rev = "refs/tags/v${version}"; - hash = "sha256-MdqO6X1dbIzmDuDSjrbmKbQfPIPcyhVIbodERYu9PZU="; + hash = "sha256-bu9kz0CCq78lp+d2uPoApzZnVybwyWD/fwgnXYG52dk="; }; - nativeBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ poetry-core ]; - propagatedBuildInputs = with python3Packages; [ + dependencies = with python3Packages; [ + numpy open-clip-torch pillow requests torch torchvision tqdm + rawpy ]; - nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; - - pythonRelaxDeps = [ "torch" "torchvision" ]; + pythonRelaxDeps = [ + "pillow" + "torch" + "torchvision" + ]; pythonImportsCheck = [ "rclip" ]; + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; + disabledTestPaths = [ # requires network "tests/e2e/test_rclip.py" @@ -45,11 +52,12 @@ python3Packages.buildPythonApplication rec { "test_loads_full_model_when_text_processing_only_requested_and_checkpoint_doesnt_exist" ]; - meta = with lib; { + meta = { description = "AI-Powered Command-Line Photo Search Tool"; homepage = "https://github.com/yurijmikhalevich/rclip"; - license = licenses.mit; - maintainers = with maintainers; [ iynaix ]; + changelog = "https://github.com/yurijmikhalevich/rclip/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ iynaix ]; mainProgram = "rclip"; }; } diff --git a/pkgs/development/python-modules/rawpy/default.nix b/pkgs/development/python-modules/rawpy/default.nix new file mode 100644 index 000000000000..6931b96afcf9 --- /dev/null +++ b/pkgs/development/python-modules/rawpy/default.nix @@ -0,0 +1,90 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + cython, + setuptools, + + # nativeBuildInputs + pkg-config, + + # buildInputs + libraw, + + # dependencies + numpy, + + # tests + imageio, + pytestCheckHook, + scikit-image, +}: + +buildPythonPackage rec { + pname = "rawpy"; + version = "0.23.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "letmaik"; + repo = "rawpy"; + rev = "refs/tags/v${version}"; + hash = "sha256-s7/YbD5Jy9Jzry817djG63Zs4It8b1S95qmcJgPYGZQ="; + }; + + build-system = [ + cython + numpy + setuptools + ]; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + libraw + ]; + + dependencies = [ + numpy + ]; + + env = { + RAWPY_USE_SYSTEM_LIBRAW = 1; + }; + + pythonImportsCheck = [ + "rawpy" + "rawpy._rawpy" + ]; + + # Delete the source files to load the library from the installed folder instead of the source files + preCheck = '' + rm -rf rawpy + ''; + + nativeCheckInputs = [ + imageio + pytestCheckHook + scikit-image + ]; + + disabledTests = [ + # rawpy._rawpy.LibRawFileUnsupportedError: b'Unsupported file format or not RAW file' + "testFoveonFileOpenAndPostProcess" + "testThumbExtractBitmap" + ]; + + meta = { + description = "RAW image processing for Python, a wrapper for libraw"; + homepage = "https://github.com/letmaik/rawpy"; + license = with lib.licenses; [ + lgpl21Only + mit + ]; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3f6ff72f5d2d..c5065e4563a8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13666,6 +13666,8 @@ self: super: with self; { rawkit = callPackage ../development/python-modules/rawkit { }; + rawpy = callPackage ../development/python-modules/rawpy { }; + ray = callPackage ../development/python-modules/ray { }; raylib-python-cffi = callPackage ../development/python-modules/raylib-python-cffi {};