Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 absl-py, 12 dm-tree, 13 h5py, 14 markdown-it-py, 15 ml-dtypes, 16 namex, 17 numpy, 18 optree, 19 packaging, 20 rich, 21 tensorflow, 22}: 23 24buildPythonPackage rec { 25 pname = "keras"; 26 version = "3.4.1"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.9"; 30 31 src = fetchFromGitHub { 32 owner = "keras-team"; 33 repo = "keras"; 34 rev = "refs/tags/v${version}"; 35 hash = "sha256-Pp84wTvcrWnxuksYUrzs9amapwBC8yU1PA0PE5dRl6k="; 36 }; 37 38 build-system = [ 39 setuptools 40 ]; 41 42 dependencies = [ 43 absl-py 44 dm-tree 45 h5py 46 markdown-it-py 47 ml-dtypes 48 namex 49 numpy 50 optree 51 packaging 52 rich 53 tensorflow 54 ]; 55 56 pythonImportsCheck = [ 57 "keras" 58 "keras._tf_keras" 59 ]; 60 61 # Couldn't get tests working 62 doCheck = false; 63 64 meta = { 65 description = "Multi-backend implementation of the Keras API, with support for TensorFlow, JAX, and PyTorch"; 66 homepage = "https://keras.io"; 67 changelog = "https://github.com/keras-team/keras/releases/tag/v${version}"; 68 license = lib.licenses.mit; 69 maintainers = with lib.maintainers; [ NikolaMandic ]; 70 }; 71}