mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
80 lines
1.4 KiB
Nix
80 lines
1.4 KiB
Nix
{ lib
|
||
, buildPythonPackage
|
||
, cmake
|
||
, fetchFromGitHub
|
||
, isPy3k
|
||
, pytestCheckHook
|
||
, nbconvert
|
||
, joblib
|
||
, jupyter
|
||
, jupyter-client
|
||
, numpy
|
||
, scipy
|
||
, pandas
|
||
, matplotlib
|
||
, ninja
|
||
, numba
|
||
, pybind11
|
||
, scikit-build
|
||
}:
|
||
|
||
buildPythonPackage rec {
|
||
pname = "phik";
|
||
version = "0.12.3";
|
||
disabled = !isPy3k;
|
||
format = "pyproject";
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "KaveIO";
|
||
repo = "PhiK";
|
||
rev = "refs/tags/v${version}";
|
||
hash = "sha256-9o3EDhgmne2J1QfzjjNQc1mUcyCzoVrCnWXqjWkiZU0=";
|
||
};
|
||
|
||
nativeCheckInputs = [
|
||
pytestCheckHook
|
||
nbconvert
|
||
jupyter
|
||
jupyter-client
|
||
];
|
||
|
||
propagatedBuildInputs = [
|
||
joblib
|
||
numpy
|
||
scipy
|
||
pandas
|
||
matplotlib
|
||
numba
|
||
pybind11
|
||
];
|
||
|
||
# uses setuptools to drive build process
|
||
dontUseCmakeConfigure = true;
|
||
|
||
nativeBuildInputs = [
|
||
cmake
|
||
ninja
|
||
scikit-build
|
||
];
|
||
|
||
pythonImportsCheck = [ "phik" ];
|
||
|
||
postInstall = ''
|
||
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;
|
||
};
|
||
}
|