Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / niaclass / default.nix
blob89d8ae746aed6334afbf1a56e3f1babf92104ae5
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , niapy
5 , numpy
6 , pandas
7 , poetry-core
8 , scikit-learn
9 , toml-adapt
10 , pytestCheckHook
11 , pythonOlder
14 buildPythonPackage rec {
15   pname = "niaclass";
16   version = "0.1.4";
17   format = "pyproject";
19   disabled = pythonOlder "3.7";
21   src = fetchFromGitHub {
22     owner = "lukapecnik";
23     repo = "NiaClass";
24     rev = "refs/tags/${version}";
25     sha256 = "sha256-md1e/cOIOQKoB760E5hjzjCsC5tS1CzgqAPTeVtrmuo=";
26   };
28   nativeBuildInputs = [
29     poetry-core
30     toml-adapt
31   ];
33   propagatedBuildInputs = [
34     niapy
35     numpy
36     pandas
37     scikit-learn
38   ];
40   # create scikit-learn dep version consistent
41   preBuild = ''
42     toml-adapt -path pyproject.toml -a change -dep scikit-learn -ver X
43   '';
45   checkInputs = [
46     pytestCheckHook
47   ];
49   pythonImportsCheck = [
50     "niaclass"
51   ];
53   meta = with lib; {
54     description = "A framework for solving classification tasks using Nature-inspired algorithms";
55     homepage = "https://github.com/lukapecnik/NiaClass";
56     license = licenses.mit;
57     maintainers = with maintainers; [ firefly-cpp ];
58   };