1{stdenv, buildPythonPackage, fetchFromGitHub, numpy, pybind11}:
2
3buildPythonPackage rec {
4 pname = "fasttext";
5 version = "0.9.1";
6
7 src = fetchFromGitHub {
8 owner = "facebookresearch";
9 repo = "fastText";
10 rev = "v${version}";
11 sha256 = "1cbzz98qn8aypp4r5kwwwc9wiq5bwzv51kcsb15xjfs9lz8h3rii";
12 };
13
14 buildInputs = [ pybind11 ];
15
16 propagatedBuildInputs = [ numpy ];
17
18 preBuild = ''
19 HOME=$TMPDIR
20 '';
21
22 meta = with stdenv.lib; {
23 description = "Python module for text classification and representation learning";
24 homepage = https://fasttext.cc/;
25 license = licenses.mit;
26 maintainers = with maintainers; [ danieldk ];
27 };
28}