1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, deap 6, numpy 7, scikit-learn 8, scipy 9, unittestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "sklearn-deap"; 14 version = "0.3.0"; 15 format = "setuptools"; 16 17 # No tests in Pypi 18 src = fetchFromGitHub { 19 owner = "rsteca"; 20 repo = "sklearn-deap"; 21 rev = version; 22 hash = "sha256-bXBHlv1pIOyDLKCBeffyHaTZ7gNiZNl0soa73e8E4/M="; 23 }; 24 25 patches = [ 26 # Fix for scikit-learn v1.1. See: https://github.com/rsteca/sklearn-deap/pull/80 27 (fetchpatch { 28 url = "https://github.com/rsteca/sklearn-deap/commit/3b84bd905796378dd845f99e083da17284c9ff6f.patch"; 29 hash = "sha256-YYLw0uzecyIbdNAy/CxxWDV67zJbZZhUMypnDm/zNGs="; 30 }) 31 (fetchpatch { 32 url = "https://github.com/rsteca/sklearn-deap/commit/2f60e215c834f60966b4e51df25e91939a72b952.patch"; 33 hash = "sha256-vn5nLPwwkjsQrp3q7C7Z230lkgRiyJN0TQxO8Apizg8="; 34 }) 35 ]; 36 37 propagatedBuildInputs = [ numpy scipy deap scikit-learn ]; 38 39 nativeCheckInputs = [ 40 unittestCheckHook 41 ]; 42 43 pythonImportsCheck = [ "evolutionary_search" ]; 44 45 meta = with lib; { 46 description = "Use evolutionary algorithms instead of gridsearch in scikit-learn"; 47 homepage = "https://github.com/rsteca/sklearn-deap"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ psyanticy ]; 50 }; 51} 52