diff --git a/pkgs/development/python-modules/scipp/default.nix b/pkgs/development/python-modules/scipp/default.nix new file mode 100644 index 000000000000..2980d84d4908 --- /dev/null +++ b/pkgs/development/python-modules/scipp/default.nix @@ -0,0 +1,107 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + scikit-build-core, + setuptools, + setuptools-scm, + + # nativeBuildInputs + cmake, + ninja, + + # dependencies + numpy, + units-llnl, + + # buildInputs + boost, + eigen, + gtest, + pybind11, + tbb_2022_0, + + # tests + pytestCheckHook, + scipy, + beautifulsoup4, + ipython, + matplotlib, + pandas, + numba, + xarray, + h5py, + hypothesis, +}: + +buildPythonPackage rec { + pname = "scipp"; + version = "25.05.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "scipp"; + repo = "Scipp"; + # https://github.com/scipp/scipp/pull/3722 + tag = version; + hash = "sha256-AanXb+nF/YIZFuzG5UnoNPX97WScfPKuoSBY18uYt9k="; + }; + env = { + SKIP_CONAN = "true"; + }; + + build-system = [ + scikit-build-core + setuptools + setuptools-scm + ]; + + nativeBuildInputs = [ + cmake + ninja + ]; + dontUseCmakeConfigure = true; + + dependencies = [ + numpy + ]; + + buildInputs = [ + boost + eigen + gtest + pybind11 + units-llnl.passthru.top-level + tbb_2022_0 + ]; + + nativeCheckInputs = [ + pytestCheckHook + scipy + beautifulsoup4 + ipython + matplotlib + pandas + numba + xarray + h5py + hypothesis + ]; + pytestFlagsArray = [ + # See https://github.com/scipp/scipp/issues/3721 + "--hypothesis-profile=ci" + ]; + + pythonImportsCheck = [ + "scipp" + ]; + + meta = { + description = "Multi-dimensional data arrays with labeled dimensions"; + homepage = "https://scipp.github.io"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ doronbehar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5d4d3954d3c8..209144e104ef 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15829,6 +15829,8 @@ self: super: with self; { scim2-tester = callPackage ../development/python-modules/scim2-tester { }; + scipp = callPackage ../development/python-modules/scipp { }; + scipy = callPackage ../development/python-modules/scipy { }; scmrepo = callPackage ../development/python-modules/scmrepo { };