2021-08-08 23:34:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, looseversion
|
2020-04-24 23:36:52 +00:00
|
|
|
, matplotlib
|
2021-08-08 23:34:03 +00:00
|
|
|
, numba
|
2023-05-24 13:37:59 +00:00
|
|
|
, numpy
|
|
|
|
, pandas
|
2021-08-08 23:34:03 +00:00
|
|
|
, pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, scipy
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trackpy";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.6.1";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "soft-matter";
|
|
|
|
repo = pname;
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-NG1TOppqRbIZHLxJjlaXD4icYlAUkSxtmmC/fsS/pXo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
looseversion
|
|
|
|
matplotlib
|
|
|
|
numba
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
pyyaml
|
2023-05-24 13:37:59 +00:00
|
|
|
scipy
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-08 23:34:03 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
preCheck = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
# specifically needed for darwin
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"trackpy"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Particle-tracking toolkit";
|
|
|
|
homepage = "https://github.com/soft-matter/trackpy";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/soft-matter/trackpy/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|