1{
2 lib,
3 buildPythonPackage,
4 dos2unix,
5 fetchPypi,
6 pytestCheckHook,
7 pythonOlder,
8 pandas,
9 torch,
10 scipy,
11}:
12
13buildPythonPackage rec {
14 pname = "slicer";
15 version = "0.0.8";
16 pyproject = true;
17 disabled = pythonOlder "3.8";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-LnVTr3PwwMLTVfSvzD7Pl8byFW/PRZOVXD9Wz2xNbrc=";
22 };
23
24 prePatch = ''
25 dos2unix slicer/*
26 '';
27
28 nativeBuildInputs = [ dos2unix ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 pandas
33 torch
34 scipy
35 ];
36
37 meta = with lib; {
38 description = "Wraps tensor-like objects and provides a uniform slicing interface via __getitem__";
39 homepage = "https://github.com/interpretml/slicer";
40 license = licenses.mit;
41 maintainers = with maintainers; [ evax ];
42 platforms = platforms.unix;
43 };
44}