at master 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 looseversion, 7 matplotlib, 8 numba, 9 numpy, 10 pandas, 11 pytestCheckHook, 12 pythonOlder, 13 pyyaml, 14 scipy, 15}: 16 17buildPythonPackage rec { 18 pname = "trackpy"; 19 version = "0.7"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "soft-matter"; 26 repo = "trackpy"; 27 tag = "v${version}"; 28 hash = "sha256-3e+gHdn/4n8T78eA3Gjz1TdSI4Hd935U2pqd8wG+U0M="; 29 }; 30 31 propagatedBuildInputs = [ 32 looseversion 33 matplotlib 34 numba 35 numpy 36 pandas 37 pyyaml 38 scipy 39 ]; 40 41 nativeCheckInputs = [ pytestCheckHook ]; 42 43 preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' 44 # specifically needed for darwin 45 export HOME=$(mktemp -d) 46 mkdir -p $HOME/.matplotlib 47 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 48 ''; 49 50 pythonImportsCheck = [ "trackpy" ]; 51 52 meta = with lib; { 53 description = "Particle-tracking toolkit"; 54 homepage = "https://github.com/soft-matter/trackpy"; 55 changelog = "https://github.com/soft-matter/trackpy/releases/tag/${src.tag}"; 56 license = licenses.bsd3; 57 maintainers = [ ]; 58 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); 59 }; 60}