at 23.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, cmake 4, fetchFromGitHub 5, isPy3k 6, pytestCheckHook 7, nbconvert 8, joblib 9, jupyter 10, jupyter-client 11, numpy 12, scipy 13, pandas 14, matplotlib 15, ninja 16, numba 17, pybind11 18, scikit-build 19}: 20 21buildPythonPackage rec { 22 pname = "phik"; 23 version = "0.12.2"; 24 disabled = !isPy3k; 25 format = "pyproject"; 26 27 src = fetchFromGitHub { 28 owner = "KaveIO"; 29 repo = "PhiK"; 30 rev = "v${version}"; 31 hash = "sha256-nr3804MLIBPFw/PlJ9B8xKFFGI5LDp8m2gLtJB7YcEE="; 32 }; 33 34 checkInputs = [ 35 pytestCheckHook 36 nbconvert 37 jupyter 38 jupyter-client 39 ]; 40 41 propagatedBuildInputs = [ 42 joblib 43 numpy 44 scipy 45 pandas 46 matplotlib 47 numba 48 pybind11 49 ]; 50 51 # uses setuptools to drive build process 52 dontUseCmakeConfigure = true; 53 54 nativeBuildInputs = [ 55 cmake 56 ninja 57 scikit-build 58 ]; 59 60 pythonImportsCheck = [ "phik" ]; 61 62 postInstall = '' 63 rm -r $out/bin 64 ''; 65 66 preCheck = '' 67 # import from $out 68 rm -r phik 69 ''; 70 71 meta = with lib; { 72 description = "Phi_K correlation analyzer library"; 73 longDescription = "Phi_K is a new and practical correlation coefficient based on several refinements to Pearsons hypothesis test of independence of two variables."; 74 homepage = "https://phik.readthedocs.io/en/latest/"; 75 changelog = "https://github.com/KaveIO/PhiK/blob/${src.rev}/CHANGES.rst"; 76 maintainers = with maintainers; [ melsigl ]; 77 license = licenses.asl20; 78 }; 79}