about summary refs log tree commit diff
path: root/pkgs/development/python-modules/slicer/default.nix
blob: 41b3e434bc71413492c9c3b0b440c32c6d2f3520 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ lib
, buildPythonPackage
, dos2unix
, fetchpatch
, fetchPypi
, pytestCheckHook
, pythonOlder
, pandas
, torch
, scipy
}:

buildPythonPackage rec {
  pname = "slicer";
  version = "0.0.8";
  pyproject = true;
  disabled = pythonOlder "3.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-LnVTr3PwwMLTVfSvzD7Pl8byFW/PRZOVXD9Wz2xNbrc=";
  };

  prePatch = ''
    dos2unix slicer/*
  '';

  nativeBuildInputs = [
    dos2unix
  ];

  nativeCheckInputs = [ pytestCheckHook pandas torch scipy ];

  meta = with lib; {
    description = "Wraps tensor-like objects and provides a uniform slicing interface via __getitem__";
    homepage = "https://github.com/interpretml/slicer";
    license = licenses.mit;
    maintainers = with maintainers; [ evax ];
    platforms = platforms.unix;
  };
}