1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 # build-system 8 uv-build, 9 10 # dependencies 11 scikit-learn, 12 numpy, 13 scipy, 14 colorama, 15 packaging, 16 17 # tests 18 jupyter, 19 matplotlib, 20 nbconvert, 21 nbformat, 22 pytestCheckHook, 23}: 24 25buildPythonPackage rec { 26 pname = "bayesian-optimization"; 27 version = "3.1.0"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "bayesian-optimization"; 32 repo = "BayesianOptimization"; 33 tag = "v${version}"; 34 hash = "sha256-CYkFobGLlh5cPLwChRWXCow0d5uz8eN5hcRanNMfW8s="; 35 }; 36 37 postPatch = '' 38 substituteInPlace pyproject.toml \ 39 --replace-fail "uv_build>=0.7.21,<0.8.0" "uv_build" 40 ''; 41 42 build-system = [ uv-build ]; 43 44 dependencies = [ 45 scikit-learn 46 numpy 47 scipy 48 colorama 49 packaging 50 ]; 51 52 nativeCheckInputs = [ 53 jupyter 54 matplotlib 55 nbconvert 56 nbformat 57 pytestCheckHook 58 ]; 59 60 pythonImportsCheck = [ "bayes_opt" ]; 61 62 __darwinAllowLocalNetworking = true; 63 64 meta = { 65 description = "Python implementation of global optimization with gaussian processes"; 66 homepage = "https://github.com/bayesian-optimization/BayesianOptimization"; 67 changelog = "https://github.com/bayesian-optimization/BayesianOptimization/releases/tag/${src.tag}"; 68 license = lib.licenses.mit; 69 maintainers = [ lib.maintainers.juliendehos ]; 70 }; 71}