1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, numpy
6, scipy
7, six
8, pandas
9, pyyaml
10, matplotlib
11, numba
12, pytestCheckHook
13}:
14
15buildPythonPackage rec {
16 pname = "trackpy";
17 version = "0.5.0";
18
19 src = fetchFromGitHub {
20 owner = "soft-matter";
21 repo = pname;
22 rev = "v${version}";
23 sha256 = "0if069f4sjyjl7wvzyzk8k9q9qjixswcc6aszrrgfb4a4mix3h1g";
24 };
25
26 propagatedBuildInputs = [
27 numpy
28 scipy
29 six
30 pandas
31 pyyaml
32 matplotlib
33 numba
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 ];
39
40 preCheck = lib.optionalString stdenv.isDarwin ''
41 # specifically needed for darwin
42 export HOME=$(mktemp -d)
43 mkdir -p $HOME/.matplotlib
44 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
45 '';
46
47 meta = with lib; {
48 broken = (stdenv.isLinux && stdenv.isAarch64);
49 description = "Particle-tracking toolkit";
50 homepage = "https://github.com/soft-matter/trackpy";
51 license = licenses.bsd3;
52 maintainers = [ maintainers.costrouc ];
53 };
54}