Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180{ lib, stdenv, buildPythonPackage, fetchFromGitHub,
# build-time qt5,
# build-system setuptools,
# dependencies fastapi, guidata, numpy, packaging, pandas, plotpy, psutil, pydantic, pywavelets, scikit-image, scipy, sigima, uvicorn,
# optional-dependencies babel, build, coverage, pre-commit, pylint, ruff, myst-parser, pydata-sphinx-theme, sphinx, sphinx-copybutton, sphinx-design, sphinx-intl, sphinx-sitemap, sphinxcontrib-svg2pdfconverter, opencv-python-headless, pyinstaller, pyqt5, httpx, pytest, pytest-xvfb,
# tests pytestCheckHook,}:
buildPythonPackage (finalAttrs: { pname = "datalab-platform"; version = "1.2.2"; pyproject = true; __structuredAttrs = true;
src = fetchFromGitHub { owner = "DataLab-Platform"; repo = "DataLab"; tag = "v${finalAttrs.version}"; hash = "sha256-c9ze/Qw6FZ78JEkoQzJSESf/0tWvbL9wHuE2xlzKlv8="; };
# NOTE: DataLab is compatible with qt6, but it's apparently not perfect as # the executable segfaults on startup. For now, let's use qt5 which works and # migrate in the future. nativeBuildInputs = [ qt5.wrapQtAppsHook ];
buildInputs = [ qt5.qtbase ] ++ lib.optionals stdenv.hostPlatform.isLinux [ qt5.qtwayland ];
build-system = [ setuptools ];
dependencies = [ fastapi guidata numpy packaging pandas plotpy psutil pydantic pywavelets scikit-image scipy sigima uvicorn ] ++ finalAttrs.passthru.optional-dependencies.qt # required for `bin/datalab-{demo,tests}` ++ finalAttrs.passthru.optional-dependencies.test;
optional-dependencies = { dev = [ babel build coverage pre-commit pylint ruff ]; doc = [ myst-parser pydata-sphinx-theme sphinx sphinx-copybutton sphinx-design sphinx-intl sphinx-sitemap sphinxcontrib-svg2pdfconverter ]; exe = [ opencv-python-headless pyinstaller pyqt5 ]; opencv = [ opencv-python-headless ]; qt = [ pyqt5 ]; test = [ httpx pytest pytest-xvfb ]; };
pythonRelaxDeps = [ "guidata" "numpy" "plotpy" "scipy" ];
pythonImportsCheck = [ "datalab" ];
nativeCheckInputs = [ pytestCheckHook ] ++ finalAttrs.passthru.optional-dependencies.test;
pytestFlags = [ "--collect-only" ];
dontWrapQtApps = true;
preFixup = '' # Python scripts need to be manually wrapped for exe in "$out/bin"/datalab*; do wrapQtApp "$exe" done '';
meta = { description = "Open-source Platform for Scientific and Technical Data Processing and Visualization"; homepage = "https://github.com/DataLab-Platform/DataLab"; changelog = "https://github.com/DataLab-Platform/DataLab/releases/tag/${finalAttrs.src.tag}"; mainProgram = "datalab"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ eljamm ]; teams = with lib.teams; [ ngi ]; };})