2020-04-24 23:36:52 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, buildPythonPackage
|
2021-10-11 16:52:03 +00:00
|
|
|
|
, cmake
|
2022-06-16 17:23:12 +00:00
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, isPy3k
|
2022-06-16 17:23:12 +00:00
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, nbconvert
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, joblib
|
2022-06-16 17:23:12 +00:00
|
|
|
|
, jupyter
|
2021-10-28 06:52:43 +00:00
|
|
|
|
, jupyter-client
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, numpy
|
|
|
|
|
, scipy
|
|
|
|
|
, pandas
|
|
|
|
|
, matplotlib
|
2021-10-11 16:52:03 +00:00
|
|
|
|
, ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, numba
|
2021-10-11 16:52:03 +00:00
|
|
|
|
, pybind11
|
2022-06-16 17:23:12 +00:00
|
|
|
|
, scikit-build
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "phik";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
version = "0.12.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
disabled = !isPy3k;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "KaveIO";
|
|
|
|
|
repo = "PhiK";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
|
hash = "sha256-9o3EDhgmne2J1QfzjjNQc1mUcyCzoVrCnWXqjWkiZU0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
|
nbconvert
|
2022-06-16 17:23:12 +00:00
|
|
|
|
jupyter
|
2021-10-28 06:52:43 +00:00
|
|
|
|
jupyter-client
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-08-20 17:08:02 +00:00
|
|
|
|
joblib
|
2020-04-24 23:36:52 +00:00
|
|
|
|
numpy
|
|
|
|
|
scipy
|
|
|
|
|
pandas
|
|
|
|
|
matplotlib
|
|
|
|
|
numba
|
2021-10-11 16:52:03 +00:00
|
|
|
|
pybind11
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# uses setuptools to drive build process
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
|
|
|
|
ninja
|
2022-06-16 17:23:12 +00:00
|
|
|
|
scikit-build
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
|
pythonImportsCheck = [ "phik" ];
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
postInstall = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
|
rm -r $out/bin
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
|
# import from $out
|
|
|
|
|
rm -r phik
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "Phi_K correlation analyzer library";
|
|
|
|
|
longDescription = "Phi_K is a new and practical correlation coefficient based on several refinements to Pearson’s hypothesis test of independence of two variables.";
|
|
|
|
|
homepage = "https://phik.readthedocs.io/en/latest/";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
changelog = "https://github.com/KaveIO/PhiK/blob/${src.rev}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
maintainers = with maintainers; [ melsigl ];
|
|
|
|
|
license = licenses.asl20;
|
|
|
|
|
};
|
|
|
|
|
}
|