about summary refs log tree commit diff
path: root/pkgs/development/python-modules/gensim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/gensim/default.nix')
-rw-r--r--pkgs/development/python-modules/gensim/default.nix46
1 files changed, 26 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/gensim/default.nix b/pkgs/development/python-modules/gensim/default.nix
index f43bfb518cfb8..c005662068ca9 100644
--- a/pkgs/development/python-modules/gensim/default.nix
+++ b/pkgs/development/python-modules/gensim/default.nix
@@ -1,15 +1,17 @@
-{ lib
-, buildPythonPackage
-, cython
-, fetchPypi
-, mock
-, numpy
-, scipy
-, smart-open
-, testfixtures
-, pyemd
-, pytestCheckHook
-, pythonOlder
+{
+  lib,
+  buildPythonPackage,
+  cython,
+  fetchPypi,
+  fetchpatch,
+  mock,
+  numpy,
+  scipy,
+  smart-open,
+  testfixtures,
+  pyemd,
+  pytestCheckHook,
+  pythonOlder,
 }:
 
 buildPythonPackage rec {
@@ -24,10 +26,18 @@ buildPythonPackage rec {
     hash = "sha256-maxq9v/UBoLnAVXtn5Lsv0OE1Z+1CvEg00PqXuGzCKs=";
   };
 
-  nativeBuildInputs = [
-    cython
+  patches = [
+    # https://github.com/piskvorky/gensim/pull/3524
+    # Import deprecated scipy.linalg.triu from numpy.triu. remove on next update
+    (fetchpatch {
+      name = "scipi-linalg-triu-fix.patch";
+      url = "https://github.com/piskvorky/gensim/commit/ad68ee3f105fc37cf8db333bfb837fe889ff74ac.patch";
+      hash = "sha256-Ij6HvVD8M2amzcjihu5bo8Lk0iCPl3iIq0lcOnI6G2s=";
+    })
   ];
 
+  nativeBuildInputs = [ cython ];
+
   propagatedBuildInputs = [
     smart-open
     numpy
@@ -40,16 +50,12 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  pythonImportsCheck = [
-    "gensim"
-  ];
+  pythonImportsCheck = [ "gensim" ];
 
   # Test setup takes several minutes
   doCheck = false;
 
-  pytestFlagsArray = [
-    "gensim/test"
-  ];
+  pytestFlagsArray = [ "gensim/test" ];
 
   meta = with lib; {
     description = "Topic-modelling library";