Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / trackpy / default.nix
blobff4c4a767583aaf711dd8fca6abb0e91ad2c4d25
1 { lib, stdenv
2 , buildPythonPackage
3 , fetchFromGitHub
4 , numpy
5 , scipy
6 , six
7 , pandas
8 , pyyaml
9 , matplotlib
10 , pytest
13 buildPythonPackage rec {
14   pname = "trackpy";
15   version = "0.4.2";
17   src = fetchFromGitHub {
18     owner = "soft-matter";
19     repo = pname;
20     rev = "v${version}";
21     sha256 = "16mc22z3104fvygky4gy3gvifjijm42db48v2z1y0fmyf6whi9p6";
22   };
24   propagatedBuildInputs = [
25     numpy
26     scipy
27     six
28     pandas
29     pyyaml
30     matplotlib
31   ];
33   checkInputs = [
34     pytest
35   ];
37   checkPhase = ''
38     ${lib.optionalString (stdenv.isDarwin) ''
39     # specifically needed for darwin
40     export HOME=$(mktemp -d)
41     mkdir -p $HOME/.matplotlib
42     echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
43     ''}
45     pytest trackpy --ignore trackpy/tests/test_motion.py \
46                    --ignore trackpy/tests/test_feature_saving.py \
47                    --ignore trackpy/tests/test_feature.py \
48                    --ignore trackpy/tests/test_plots.py \
49                    --ignore trackpy/tests/test_legacy_linking.py
50   '';
52   meta = with lib; {
53     description = "Particle-tracking toolkit";
54     homepage = "https://github.com/soft-matter/trackpy";
55     license = licenses.bsd3;
56     maintainers = [ maintainers.costrouc ];
57     broken = true; # not compatible with latest pandas
58   };