1{ stdenv, buildPythonPackage, fetchpatch, fetchPypi, python
2, nose, pillow
3, gfortran, glibcLocales
4, numpy, scipy
5}:
6
7buildPythonPackage rec {
8 pname = "scikit-learn";
9 version = "0.19.1";
10 name = "${pname}-${version}";
11 disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "5ca0ad32ee04abe0d4ba02c8d89d501b4e5e0304bdf4d45c2e9875a735b323a0";
16 };
17
18 buildInputs = [ nose pillow gfortran glibcLocales ];
19 propagatedBuildInputs = [ numpy scipy numpy.blas ];
20
21 LC_ALL="en_US.UTF-8";
22
23 # Disable doctests on OSX: https://github.com/scikit-learn/scikit-learn/issues/10213
24 # Disable doctests everywhere: https://github.com/NixOS/nixpkgs/issues/35436
25 checkPhase = ''
26 HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests --doctest-options=+SKIP $out/${python.sitePackages}/sklearn/
27 '';
28
29 meta = with stdenv.lib; {
30 description = "A set of python modules for machine learning and data mining";
31 homepage = http://scikit-learn.org;
32 license = licenses.bsd3;
33 maintainers = with maintainers; [ fridh ];
34 };
35}