Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions pkgs/development/python-modules/bz2file/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
}:

buildPythonPackage rec {
pname = "bz2file";
version = "0.98";
name = "${pname}-${version}";

src = fetchPypi {
inherit pname version;
sha256 = "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4";
};

doCheck = false;
# The test module (test_bz2file) is not available

meta = {
description = "Bz2file is a Python library for reading and writing bzip2-compressed files";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jpbernardy ];
};
}
43 changes: 43 additions & 0 deletions pkgs/development/python-modules/gensim/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{ lib
, buildPythonPackage
, fetchPypi
, numpy
, six
, scipy
, smart_open
, scikitlearn
, testfixtures
, unittest2
}:

buildPythonPackage rec {
pname = "gensim";
name = "${pname}-${version}";
version = "2.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "1wn7bji9b80wn1yggmh7a0dlwzdjr6cp24x4p33j2rf29lxnm2kc";
};

propagatedBuildInputs = [ smart_open numpy six scipy
# scikitlearn testfixtures unittest2 # for tests
];
doCheck = false;

# Two tests fail.

# ERROR: testAddMorphemesToEmbeddings (gensim.test.test_varembed_wrapper.TestVarembed)
# ImportError: Could not import morfessor.
# This package is not in nix

# ERROR: testWmdistance (gensim.test.test_fasttext_wrapper.TestFastText)
# ImportError: Please install pyemd Python package to compute WMD.
# This package is not in nix

meta = {
description = "Topic-modelling library";
homepage = "https://radimrehurek.com/gensim/";
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [ jpbernardy ];
};
}
28 changes: 28 additions & 0 deletions pkgs/development/python-modules/smart_open/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, boto
, bz2file
, moto
, requests
, responses
}:

buildPythonPackage rec {
pname = "smart_open";
name = "${pname}-${version}";
version = "1.5.3";

src = fetchPypi {
inherit pname version;
sha256 = "0m5j71f7f36s17v4mwv0bxg4azknvcy82rbjp28b4vifrjd6dm7s";
};

propagatedBuildInputs = [ boto bz2file requests responses moto ];
meta = {
license = lib.licenses.mit;
description = "smart_open is a Python 2 & Python 3 library for efficient streaming of very large file";
maintainers = with lib.maintainers; [ jpbernardy ];
};
}
10 changes: 8 additions & 2 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2969,11 +2969,11 @@ in {

boto = buildPythonPackage rec {
name = "boto-${version}";
version = "2.45.0";
version = "2.47.0";

src = pkgs.fetchurl {
url = "https://github.com/boto/boto/archive/${version}.tar.gz";
sha256 = "18z5nacnbdpw3pmzc56didhy4sfik8riap204px24350g9xlgz7i";
sha256 = "051gq8z9m2cir03jhc00qs36bnpla7zkqm9xqiqcqvdknmi2ndbq";
};

checkPhase = ''
Expand Down Expand Up @@ -30483,6 +30483,12 @@ EOF

distro = callPackage ../development/python-modules/distro { };

bz2file = callPackage ../development/python-modules/bz2file { };

smart_open = callPackage ../development/python-modules/smart_open { };

gensim = callPackage ../development/python-modules/gensim { };

});

in fix' (extends overrides packages)