1{ fetchurl, boost, zlib, clang, ncurses, pythonPackages, lib }:
2
3pythonPackages.buildPythonPackage rec {
4 pname = "vowpalwabbit";
5 name = "${pname}-${version}";
6 version = "8.4.0";
7
8 src = fetchurl{
9 url = "mirror://pypi/v/vowpalwabbit/${name}.tar.gz";
10 sha256 = "abd22bfae99fb102cf8a6aec49e8c278cb7317d3a7eb60f70cd102be9c336fd5";
11 };
12 # vw tries to write some explicit things to home
13 # python installed: The directory '/homeless-shelter/.cache/pip/http'
14 preInstall = ''
15 export HOME=$PWD
16 '';
17
18 buildInputs = with pythonPackages; [ boost.dev zlib.dev clang ncurses pytest docutils pygments ];
19 propagatedBuildInputs = with pythonPackages; [ numpy scipy scikitlearn ];
20
21 checkPhase = ''
22 # check-manifest requires a git clone, not a tarball
23 # check-manifest --ignore "Makefile,PACKAGE.rst,*.cc,tox.ini,tests*,examples*,src*"
24 python setup.py check -mrs
25 '';
26
27 meta = with lib; {
28 description = "Vowpal Wabbit is a fast machine learning library for online learning, and this is the python wrapper for the project.";
29 homepage = https://github.com/JohnLangford/vowpal_wabbit;
30 license = licenses.bsd3;
31 maintainers = with maintainers; [ teh ];
32 };
33}