summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/sklearn-deap/default.nix
blob: 9c3cefee1c2320b544e02c7f6445bafaad26d0e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  deap,
  numpy,
  scikit-learn,
  scipy,
  unittestCheckHook,
}:

buildPythonPackage rec {
  pname = "sklearn-deap";
  version = "0.3.0";
  format = "setuptools";

  # No tests in Pypi
  src = fetchFromGitHub {
    owner = "rsteca";
    repo = "sklearn-deap";
    rev = version;
    hash = "sha256-bXBHlv1pIOyDLKCBeffyHaTZ7gNiZNl0soa73e8E4/M=";
  };

  patches = [
    # Fix for scikit-learn v1.1. See: https://github.com/rsteca/sklearn-deap/pull/80
    (fetchpatch {
      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=";
    })
  ];

  propagatedBuildInputs = [
    numpy
    scipy
    deap
    scikit-learn
  ];

  nativeCheckInputs = [ unittestCheckHook ];

  pythonImportsCheck = [ "evolutionary_search" ];

  meta = {
    description = "Use evolutionary algorithms instead of gridsearch in scikit-learn";
    homepage = "https://github.com/rsteca/sklearn-deap";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ psyanticy ];
    broken = true; # incompatible with scikit-learn >= 1.6
  };
}