summary refs log tree commit diff
path: root/pkgs/development/python-modules/sklearn-deap/default.nix
blob: 47df62dd1c6a67777c3c11c12a572f363a74b235 (plain) (blame)
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
{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikitlearn, python }:

buildPythonPackage rec {
  pname = "sklearn-deap";
  version = "0.2.3";

  # No tests in Pypi
  src = fetchFromGitHub {
    owner = "rsteca";
    repo = pname;
    rev = version;
    sha256 = "1yqnmy8h08i2y6bb2s0a5nx9cwvyg45293whqh420c195gpzg1x3";
  };

  patches = [
    # Fix for newer versions of scikit-learn. See: https://github.com/rsteca/sklearn-deap/pull/62
    (fetchpatch {
      url = "https://github.com/rsteca/sklearn-deap/commit/3ae62990fc87f36b59382e7c4db3c74cf99ec3bf.patch";
      sha256 = "1na6wf4v0dcmyz3pz8aiqkmv76d1iz3hi4iyfq9kfnycgzpv1kxk";
    })
  ];

  propagatedBuildInputs = [ numpy scipy deap scikitlearn ];

  checkPhase = ''
    ${python.interpreter} test.py
  '';

  meta = with stdenv.lib; {
    description = "Use evolutionary algorithms instead of gridsearch in scikit-learn";
    homepage = https://github.com/rsteca/sklearn-deap;
    license = licenses.lgpl3;
    maintainers = with maintainers; [ psyanticy ];
  };
}