diff options
Diffstat (limited to 'pkgs/development/python-modules/phik/default.nix')
-rw-r--r-- | pkgs/development/python-modules/phik/default.nix | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/phik/default.nix b/pkgs/development/python-modules/phik/default.nix index 2919fb5c733..a6dc63b8e3f 100644 --- a/pkgs/development/python-modules/phik/default.nix +++ b/pkgs/development/python-modules/phik/default.nix @@ -1,12 +1,12 @@ { lib , buildPythonPackage , cmake -, fetchPypi +, fetchFromGitHub , isPy3k -, pytest -, pytest-pylint +, pytestCheckHook , nbconvert , joblib +, jupyter , jupyter-client , numpy , scipy @@ -15,22 +15,26 @@ , ninja , numba , pybind11 +, scikit-build }: buildPythonPackage rec { pname = "phik"; version = "0.12.2"; disabled = !isPy3k; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-sGdOuCnSMpBDP3GNI2ASK+gEsXDMyAetnZqNHBOYVTM="; + src = fetchFromGitHub { + owner = "KaveIO"; + repo = "PhiK"; + rev = "v${version}"; + hash = "sha256-nr3804MLIBPFw/PlJ9B8xKFFGI5LDp8m2gLtJB7YcEE="; }; checkInputs = [ - pytest - pytest-pylint + pytestCheckHook nbconvert + jupyter jupyter-client ]; @@ -50,16 +54,25 @@ buildPythonPackage rec { nativeBuildInputs = [ cmake ninja + scikit-build ]; + pythonImportsCheck = [ "phik" ]; + postInstall = '' - rm -r $out/bin + rm -r $out/bin + ''; + + preCheck = '' + # import from $out + rm -r phik ''; 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/"; + changelog = "https://github.com/KaveIO/PhiK/blob/${src.rev}/CHANGES.rst"; maintainers = with maintainers; [ melsigl ]; license = licenses.asl20; }; |