Loading pkgs/development/python-modules/magika/default.nix +22 −7 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, click, fetchPypi, # build-system hatchling, # dependencies click, numpy, onnxruntime, hatchling, python-dotenv, tabulate, tqdm, # tests pytestCheckHook, dacite, versionCheckHook, }: buildPythonPackage rec { let isNotAarch64Linux = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); in buildPythonPackage (finalAttrs: { pname = "magika"; version = "1.0.1"; pyproject = true; Loading @@ -23,7 +33,7 @@ buildPythonPackage rec { # Pypi tarball contains a pure python implementation of magika # while GitHub source requires compiling magika-cli src = fetchPypi { inherit pname version; inherit (finalAttrs) pname version; hash = "sha256-MT+Mv83Jp+VcJChicyMKJzK4mCXlipPeK1dlMTk7g5g="; }; Loading Loading @@ -63,14 +73,19 @@ buildPythonPackage rec { "test_magika_module_with_previously_missdetected_samples" ]; pythonImportsCheck = [ "magika" ]; # aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # # -> Skip all tests that require importing magika pythonImportsCheck = lib.optionals isNotAarch64Linux [ "magika" ]; doCheck = isNotAarch64Linux; meta = { description = "Detect file content types with deep learning"; homepage = "https://github.com/google/magika"; changelog = "https://github.com/google/magika/blob/python-v${version}/python/CHANGELOG.md"; changelog = "https://github.com/google/magika/blob/python-v${finalAttrs.version}/python/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ mihaimaruseac ]; mainProgram = "magika-python-client"; }; } }) pkgs/development/python-modules/markitdown/default.nix +26 −9 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, # build-system hatchling, # dependencies beautifulsoup4, defusedxml, ffmpeg-headless, lxml, magika, mammoth, markdownify, numpy, olefile, openai, openpyxl, pandas, Loading @@ -20,15 +27,20 @@ python-pptx, requests, speechrecognition, youtube-transcript-api, olefile, xlrd, lxml, youtube-transcript-api, # tests pytestCheckHook, # passthru gitUpdater, }: buildPythonPackage rec { let isNotAarch64Linux = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); in buildPythonPackage (finalAttrs: { pname = "markitdown"; version = "0.1.4"; pyproject = true; Loading @@ -36,11 +48,11 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "microsoft"; repo = "markitdown"; tag = "v${version}"; tag = "v${finalAttrs.version}"; hash = "sha256-WKA2eY8wY3SM9xZ7Cek5eUcJbO5q6eMDx2aTKfQnFvE="; }; sourceRoot = "${src.name}/packages/markitdown"; sourceRoot = "${finalAttrs.src.name}/packages/markitdown"; build-system = [ hatchling ]; Loading Loading @@ -71,7 +83,12 @@ buildPythonPackage rec { youtube-transcript-api ]; pythonImportsCheck = [ "markitdown" ]; # aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # # -> Skip all tests that require importing markitdown pythonImportsCheck = lib.optionals isNotAarch64Linux [ "markitdown" ]; doCheck = isNotAarch64Linux; nativeCheckInputs = [ pytestCheckHook ]; Loading @@ -88,8 +105,8 @@ buildPythonPackage rec { meta = { description = "Python tool for converting files and office documents to Markdown"; homepage = "https://github.com/microsoft/markitdown"; changelog = "https://github.com/microsoft/markitdown/releases/tag/${src.tag}"; changelog = "https://github.com/microsoft/markitdown/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = [ ]; }; } }) pkgs/development/python-modules/rembg/default.nix +10 −1 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, Loading Loading @@ -36,6 +37,9 @@ withCli ? false, }: let isNotAarch64Linux = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); in buildPythonPackage (finalAttrs: { pname = "rembg"; version = "2.0.72"; Loading Loading @@ -106,7 +110,12 @@ buildPythonPackage (finalAttrs: { "NUMBA_CACHE_DIR" ]; pythonImportsCheck = [ "rembg" ]; # aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # # -> Skip all tests that require importing rembg pythonImportsCheck = lib.optionals isNotAarch64Linux [ "rembg" ]; doCheck = isNotAarch64Linux; meta = { description = "Tool to remove background from images"; Loading Loading
pkgs/development/python-modules/magika/default.nix +22 −7 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, click, fetchPypi, # build-system hatchling, # dependencies click, numpy, onnxruntime, hatchling, python-dotenv, tabulate, tqdm, # tests pytestCheckHook, dacite, versionCheckHook, }: buildPythonPackage rec { let isNotAarch64Linux = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); in buildPythonPackage (finalAttrs: { pname = "magika"; version = "1.0.1"; pyproject = true; Loading @@ -23,7 +33,7 @@ buildPythonPackage rec { # Pypi tarball contains a pure python implementation of magika # while GitHub source requires compiling magika-cli src = fetchPypi { inherit pname version; inherit (finalAttrs) pname version; hash = "sha256-MT+Mv83Jp+VcJChicyMKJzK4mCXlipPeK1dlMTk7g5g="; }; Loading Loading @@ -63,14 +73,19 @@ buildPythonPackage rec { "test_magika_module_with_previously_missdetected_samples" ]; pythonImportsCheck = [ "magika" ]; # aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # # -> Skip all tests that require importing magika pythonImportsCheck = lib.optionals isNotAarch64Linux [ "magika" ]; doCheck = isNotAarch64Linux; meta = { description = "Detect file content types with deep learning"; homepage = "https://github.com/google/magika"; changelog = "https://github.com/google/magika/blob/python-v${version}/python/CHANGELOG.md"; changelog = "https://github.com/google/magika/blob/python-v${finalAttrs.version}/python/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ mihaimaruseac ]; mainProgram = "magika-python-client"; }; } })
pkgs/development/python-modules/markitdown/default.nix +26 −9 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, # build-system hatchling, # dependencies beautifulsoup4, defusedxml, ffmpeg-headless, lxml, magika, mammoth, markdownify, numpy, olefile, openai, openpyxl, pandas, Loading @@ -20,15 +27,20 @@ python-pptx, requests, speechrecognition, youtube-transcript-api, olefile, xlrd, lxml, youtube-transcript-api, # tests pytestCheckHook, # passthru gitUpdater, }: buildPythonPackage rec { let isNotAarch64Linux = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); in buildPythonPackage (finalAttrs: { pname = "markitdown"; version = "0.1.4"; pyproject = true; Loading @@ -36,11 +48,11 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "microsoft"; repo = "markitdown"; tag = "v${version}"; tag = "v${finalAttrs.version}"; hash = "sha256-WKA2eY8wY3SM9xZ7Cek5eUcJbO5q6eMDx2aTKfQnFvE="; }; sourceRoot = "${src.name}/packages/markitdown"; sourceRoot = "${finalAttrs.src.name}/packages/markitdown"; build-system = [ hatchling ]; Loading Loading @@ -71,7 +83,12 @@ buildPythonPackage rec { youtube-transcript-api ]; pythonImportsCheck = [ "markitdown" ]; # aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # # -> Skip all tests that require importing markitdown pythonImportsCheck = lib.optionals isNotAarch64Linux [ "markitdown" ]; doCheck = isNotAarch64Linux; nativeCheckInputs = [ pytestCheckHook ]; Loading @@ -88,8 +105,8 @@ buildPythonPackage rec { meta = { description = "Python tool for converting files and office documents to Markdown"; homepage = "https://github.com/microsoft/markitdown"; changelog = "https://github.com/microsoft/markitdown/releases/tag/${src.tag}"; changelog = "https://github.com/microsoft/markitdown/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = [ ]; }; } })
pkgs/development/python-modules/rembg/default.nix +10 −1 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, Loading Loading @@ -36,6 +37,9 @@ withCli ? false, }: let isNotAarch64Linux = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); in buildPythonPackage (finalAttrs: { pname = "rembg"; version = "2.0.72"; Loading Loading @@ -106,7 +110,12 @@ buildPythonPackage (finalAttrs: { "NUMBA_CACHE_DIR" ]; pythonImportsCheck = [ "rembg" ]; # aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # # -> Skip all tests that require importing rembg pythonImportsCheck = lib.optionals isNotAarch64Linux [ "rembg" ]; doCheck = isNotAarch64Linux; meta = { description = "Tool to remove background from images"; Loading