@@ -1,5 +1,17 @@
1−{ stdenv, lib, buildPythonPackage, fetchPypi, python, zlib, clang
2−, ncurses, pytest, docutils, pygments, numpy, scipy, scikitlearn }:
1+{ stdenv
2+, lib
3+, fetchPypi
4+, buildPythonPackage
5+, cmake
6+, python
7+, zlib
8+, ncurses
9+, pytest
10+, docutils
11+, pygments
12+, numpy
13+, scipy
14+, scikitlearn }:
315
416buildPythonPackage rec {
517 pname = "vowpalwabbit";
@@ -10,21 +22,27 @@ buildPythonPackage rec {
1022 sha256 = "bd4c7e49a6ddaa1afedf97b22b822c7322328d686d45151b47a5127fc409c2af";
1123 };
1224
13− # Should be fixed in next Python release after 8.5.0:
14− # https://github.com/JohnLangford/vowpal_wabbit/pull/1533
15− patches = [
16− ./vowpal-wabbit-find-boost.diff
25+ nativeBuildInputs = [
26+ cmake
1727 ];
1828
19− # vw tries to write some explicit things to home
20− # python installed: The directory '/homeless-shelter/.cache/pip/http'
21− preInstall = ''
22− export HOME=$PWD
23− '';
29+ buildInputs = [
30+ docutils
31+ ncurses
32+ pygments
33+ python.pkgs.boost
34+ zlib.dev
35+ ];
36+
37+ propagatedBuildInputs = [
38+ numpy
39+ scikitlearn
40+ scipy
41+ ];
2442
25− nativeBuildInputs = [ clang ];
26− buildInputs = [ python.pkgs.boost zlib.dev ncurses pytest docutils pygments ];
27− propagatedBuildInputs = [ numpy scipy scikitlearn ];
43+ # Python build script uses CMake, but we don't want CMake to do the
44+ # configuration.
45+ dontUseCmakeConfigure = true;
2846
2947 # Python ctypes.find_library uses DYLD_LIBRARY_PATH.
3048 preConfigure = lib.optionalString stdenv.isDarwin ''
@@ -34,12 +52,12 @@ buildPythonPackage rec {
3452 checkPhase = ''
3553 # check-manifest requires a git clone, not a tarball
3654 # check-manifest --ignore "Makefile,PACKAGE.rst,*.cc,tox.ini,tests*,examples*,src*"
37− ${python.interpreter} setup.py check -mrs
55+ ${python.interpreter} setup.py check -ms
3856 '';
3957
4058 meta = with lib; {
4159 description = "Vowpal Wabbit is a fast machine learning library for online learning, and this is the python wrapper for the project.";
42− homepage = https://github.com/JohnLangford/vowpal_wabbit;
60+ homepage = "https://github.com/JohnLangford/vowpal_wabbit";
4361 license = licenses.bsd3;
4462 broken = stdenv.isAarch64;
4563 maintainers = with maintainers; [ teh ];