summary refs log tree commit diff
path: root/pkgs/development/python-modules/vowpalwabbit/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/vowpalwabbit/default.nix')
-rw-r--r--pkgs/development/python-modules/vowpalwabbit/default.nix50
1 files changed, 34 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/vowpalwabbit/default.nix b/pkgs/development/python-modules/vowpalwabbit/default.nix
index d23f45b122f..65dbce862a4 100644
--- a/pkgs/development/python-modules/vowpalwabbit/default.nix
+++ b/pkgs/development/python-modules/vowpalwabbit/default.nix
@@ -1,5 +1,17 @@
-{ stdenv, lib, buildPythonPackage, fetchPypi, python, zlib, clang
-, ncurses, pytest, docutils, pygments, numpy, scipy, scikitlearn }:
+{ stdenv
+, lib
+, fetchPypi
+, buildPythonPackage
+, cmake
+, python
+, zlib
+, ncurses
+, pytest
+, docutils
+, pygments
+, numpy
+, scipy
+, scikitlearn }:
 
 buildPythonPackage rec {
   pname = "vowpalwabbit";
@@ -10,21 +22,27 @@ buildPythonPackage rec {
     sha256 = "bd4c7e49a6ddaa1afedf97b22b822c7322328d686d45151b47a5127fc409c2af";
   };
 
-  # Should be fixed in next Python release after 8.5.0:
-  # https://github.com/JohnLangford/vowpal_wabbit/pull/1533
-  patches = [
-    ./vowpal-wabbit-find-boost.diff
+  nativeBuildInputs = [
+    cmake
   ];
 
-  # vw tries to write some explicit things to home
-  # python installed: The directory '/homeless-shelter/.cache/pip/http'
-  preInstall = ''
-    export HOME=$PWD
-  '';
+  buildInputs = [
+    docutils
+    ncurses
+    pygments
+    python.pkgs.boost
+    zlib.dev
+  ];
+
+  propagatedBuildInputs = [
+    numpy
+    scikitlearn
+    scipy
+  ];
 
-  nativeBuildInputs = [ clang ];
-  buildInputs = [ python.pkgs.boost zlib.dev ncurses pytest docutils pygments ];
-  propagatedBuildInputs = [ numpy scipy scikitlearn ];
+  # Python build script uses CMake, but we don't want CMake to do the
+  # configuration.
+  dontUseCmakeConfigure = true;
 
   # Python ctypes.find_library uses DYLD_LIBRARY_PATH.
   preConfigure = lib.optionalString stdenv.isDarwin ''
@@ -34,12 +52,12 @@ buildPythonPackage rec {
   checkPhase = ''
     # check-manifest requires a git clone, not a tarball
     # check-manifest --ignore "Makefile,PACKAGE.rst,*.cc,tox.ini,tests*,examples*,src*"
-    ${python.interpreter} setup.py check -mrs
+    ${python.interpreter} setup.py check -ms
   '';
 
   meta = with lib; {
     description = "Vowpal Wabbit is a fast machine learning library for online learning, and this is the python wrapper for the project.";
-    homepage    = https://github.com/JohnLangford/vowpal_wabbit;
+    homepage    = "https://github.com/JohnLangford/vowpal_wabbit";
     license     = licenses.bsd3;
     broken      = stdenv.isAarch64;
     maintainers = with maintainers; [ teh ];