diff --git a/pkgs/development/python-modules/fasttext/default.nix b/pkgs/development/python-modules/fasttext/default.nix new file mode 100644 index 000000000000..05034dc75262 --- /dev/null +++ b/pkgs/development/python-modules/fasttext/default.nix @@ -0,0 +1,28 @@ +{stdenv, buildPythonPackage, fetchFromGitHub, numpy, pybind11}: + +buildPythonPackage rec { + pname = "fasttext"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "facebookresearch"; + repo = "fastText"; + rev = version; + sha256 = "1fcrz648r2s80bf7vc0l371xillz5jk3ldaiv9jb7wnsyri831b4"; + }; + + buildInputs = [ pybind11 ]; + + propagatedBuildInputs = [ numpy ]; + + preBuild = '' + HOME=$TMPDIR + ''; + + meta = with stdenv.lib; { + description = "Python module for text classification and representation learning"; + homepage = https://fasttext.cc/; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d9ebd75b5c10..66b9e828409f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -399,6 +399,8 @@ in { fastpbkdf2 = callPackage ../development/python-modules/fastpbkdf2 { }; + fasttext = callPackage ../development/python-modules/fasttext { }; + favicon = callPackage ../development/python-modules/favicon { }; fido2 = callPackage ../development/python-modules/fido2 { };