at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 niapy, 6 numpy, 7 poetry-core, 8 pytestCheckHook, 9 pythonOlder, 10 scikit-learn, 11 toml-adapt, 12 tomli, 13 torch, 14}: 15 16buildPythonPackage rec { 17 pname = "nianet"; 18 version = "1.1.4"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.9"; 22 23 src = fetchFromGitHub { 24 owner = "SasoPavlic"; 25 repo = "nianet"; 26 tag = "version_${version}"; 27 sha256 = "sha256-FZipl6Z9AfiL6WH0kvUn8bVxt8JLdDVlmTSqnyxe0nY="; 28 }; 29 30 build-system = [ 31 poetry-core 32 toml-adapt 33 ]; 34 35 dependencies = [ 36 niapy 37 numpy 38 scikit-learn 39 torch 40 ]; 41 42 pythonRelaxDeps = [ 43 "numpy" 44 ]; 45 46 # create niapy and torch dep version consistent 47 preBuild = '' 48 toml-adapt -path pyproject.toml -a change -dep niapy -ver X 49 toml-adapt -path pyproject.toml -a change -dep torch -ver X 50 ''; 51 52 nativeCheckInputs = [ 53 pytestCheckHook 54 tomli 55 ]; 56 57 pythonImportsCheck = [ "nianet" ]; 58 59 meta = with lib; { 60 description = "Designing and constructing neural network topologies using nature-inspired algorithms"; 61 homepage = "https://github.com/SasoPavlic/NiaNet"; 62 changelog = "https://github.com/SasoPavlic/NiaNet/releases/tag/v${version}"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ firefly-cpp ]; 65 }; 66}