nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 cmake,
5 fetchFromGitHub,
6 joblib,
7 matplotlib,
8 ninja,
9 numpy,
10 pandas,
11 pathspec,
12 pyproject-metadata,
13 pybind11,
14 pytestCheckHook,
15 scikit-build-core,
16 scipy,
17}:
18
19buildPythonPackage rec {
20 pname = "phik";
21 version = "0.12.5";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "KaveIO";
26 repo = "PhiK";
27 tag = "v${version}";
28 hash = "sha256-/Zzin3IHwlFEDQwKjzTwY4ET2r0k3Ne/2lGzXkur9p8=";
29 };
30
31 build-system = [
32 cmake
33 ninja
34 pathspec
35 pybind11
36 pyproject-metadata
37 scikit-build-core
38 ];
39
40 dependencies = [
41 joblib
42 matplotlib
43 numpy
44 pandas
45 scipy
46 ];
47
48 nativeCheckInputs = [ pytestCheckHook ];
49
50 # Uses scikit-build-core to drive build process
51 dontUseCmakeConfigure = true;
52
53 pythonImportsCheck = [ "phik" ];
54
55 preCheck = ''
56 # import from $out
57 rm -r phik
58 '';
59
60 disabledTests = [
61 # AssertionError: np.False_ is not true
62 "test_phik_calculation"
63 ];
64
65 meta = {
66 description = "Phi_K correlation analyzer library";
67 longDescription = ''
68 Phi_K is a new and practical correlation coefficient based on several refinements to
69 Pearson’s hypothesis test of independence of two variables.
70 '';
71 homepage = "https://phik.readthedocs.io/";
72 changelog = "https://github.com/KaveIO/PhiK/blob/${src.tag}/CHANGES.rst";
73 license = lib.licenses.asl20;
74 maintainers = with lib.maintainers; [ melsigl ];
75 };
76}