2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
deap,
|
|
|
|
numpy,
|
|
|
|
scikit-learn,
|
|
|
|
scipy,
|
|
|
|
unittestCheckHook,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sklearn-deap";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.3.0";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# No tests in Pypi
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rsteca";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "sklearn-deap";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-bXBHlv1pIOyDLKCBeffyHaTZ7gNiZNl0soa73e8E4/M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2023-10-09 19:29:22 +00:00
|
|
|
# Fix for scikit-learn v1.1. See: https://github.com/rsteca/sklearn-deap/pull/80
|
2020-04-24 23:36:52 +00:00
|
|
|
(fetchpatch {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://github.com/rsteca/sklearn-deap/commit/3b84bd905796378dd845f99e083da17284c9ff6f.patch";
|
|
|
|
hash = "sha256-YYLw0uzecyIbdNAy/CxxWDV67zJbZZhUMypnDm/zNGs=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/rsteca/sklearn-deap/commit/2f60e215c834f60966b4e51df25e91939a72b952.patch";
|
|
|
|
hash = "sha256-vn5nLPwwkjsQrp3q7C7Z230lkgRiyJN0TQxO8Apizg8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
deap
|
|
|
|
scikit-learn
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
pythonImportsCheck = [ "evolutionary_search" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Use evolutionary algorithms instead of gridsearch in scikit-learn";
|
|
|
|
homepage = "https://github.com/rsteca/sklearn-deap";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|