Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 65 lines 1.4 kB view raw
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 }: 15 16buildPythonPackage rec { 17 pname = "vowpalwabbit"; 18 version = "8.8.0"; 19 20 src = fetchPypi{ 21 inherit pname version; 22 sha256 = "bd4c7e49a6ddaa1afedf97b22b822c7322328d686d45151b47a5127fc409c2af"; 23 }; 24 25 nativeBuildInputs = [ 26 cmake 27 ]; 28 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 ]; 42 43 # Python build script uses CMake, but we don't want CMake to do the 44 # configuration. 45 dontUseCmakeConfigure = true; 46 47 # Python ctypes.find_library uses DYLD_LIBRARY_PATH. 48 preConfigure = lib.optionalString stdenv.isDarwin '' 49 export DYLD_LIBRARY_PATH="${python.pkgs.boost}/lib" 50 ''; 51 52 checkPhase = '' 53 # check-manifest requires a git clone, not a tarball 54 # check-manifest --ignore "Makefile,PACKAGE.rst,*.cc,tox.ini,tests*,examples*,src*" 55 ${python.interpreter} setup.py check -ms 56 ''; 57 58 meta = with lib; { 59 description = "Vowpal Wabbit is a fast machine learning library for online learning, and this is the python wrapper for the project."; 60 homepage = "https://github.com/JohnLangford/vowpal_wabbit"; 61 license = licenses.bsd3; 62 broken = stdenv.isAarch64; 63 maintainers = with maintainers; [ teh ]; 64 }; 65}