1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 niapy, 6 numpy, 7 pandas, 8 poetry-core, 9 pytestCheckHook, 10 pythonOlder, 11 pythonRelaxDepsHook, 12 scikit-learn, 13 toml-adapt, 14}: 15 16buildPythonPackage rec { 17 pname = "niaclass"; 18 version = "0.2.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.9"; 22 23 src = fetchFromGitHub { 24 owner = "lukapecnik"; 25 repo = "NiaClass"; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-C3EF18lzheE+dXHJA6WJNFECAH4HfPiCDo7QxtHvOLI="; 28 }; 29 30 pythonRelaxDeps = [ "pandas" ]; 31 32 nativeBuildInputs = [ 33 poetry-core 34 pythonRelaxDepsHook 35 toml-adapt 36 ]; 37 38 propagatedBuildInputs = [ 39 niapy 40 numpy 41 pandas 42 scikit-learn 43 ]; 44 45 # create scikit-learn dep version consistent 46 preBuild = '' 47 toml-adapt -path pyproject.toml -a change -dep scikit-learn -ver X 48 ''; 49 50 nativeCheckInputs = [ pytestCheckHook ]; 51 52 pythonImportsCheck = [ "niaclass" ]; 53 54 meta = with lib; { 55 description = "A framework for solving classification tasks using Nature-inspired algorithms"; 56 homepage = "https://github.com/lukapecnik/NiaClass"; 57 changelog = "https://github.com/lukapecnik/NiaClass/releases/tag/${version}"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ firefly-cpp ]; 60 }; 61}