1{ stdenv 2, lib 3, fetchPypi 4, buildPythonPackage 5, cmake 6, python 7, zlib 8, ncurses 9, docutils 10, pygments 11, numpy 12, scipy 13, scikit-learn }: 14 15buildPythonPackage rec { 16 pname = "vowpalwabbit"; 17 version = "8.11.0"; 18 19 src = fetchPypi{ 20 inherit pname version; 21 sha256 = "cfde0515a3fa4d224aad5461135372f3441ae1a64717ae6bff5e23509d70b0bd"; 22 }; 23 24 nativeBuildInputs = [ 25 cmake 26 ]; 27 28 buildInputs = [ 29 docutils 30 ncurses 31 pygments 32 python.pkgs.boost 33 zlib.dev 34 ]; 35 36 propagatedBuildInputs = [ 37 numpy 38 scikit-learn 39 scipy 40 ]; 41 42 # Python build script uses CMake, but we don't want CMake to do the 43 # configuration. 44 dontUseCmakeConfigure = true; 45 46 # Python ctypes.find_library uses DYLD_LIBRARY_PATH. 47 preConfigure = lib.optionalString stdenv.isDarwin '' 48 export DYLD_LIBRARY_PATH="${python.pkgs.boost}/lib" 49 ''; 50 51 checkPhase = '' 52 # check-manifest requires a git clone, not a tarball 53 # check-manifest --ignore "Makefile,PACKAGE.rst,*.cc,tox.ini,tests*,examples*,src*" 54 ${python.interpreter} setup.py check -ms 55 ''; 56 57 meta = with lib; { 58 description = "Vowpal Wabbit is a fast machine learning library for online learning, and this is the python wrapper for the project."; 59 homepage = "https://github.com/JohnLangford/vowpal_wabbit"; 60 license = licenses.bsd3; 61 broken = stdenv.isAarch64; 62 maintainers = with maintainers; [ teh ]; 63 }; 64}