2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pybind11,
|
2023-02-22 10:55:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fasttext-predict";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.9.2.2";
|
2023-02-22 10:55:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-rMbf09pCHvVYI9g/aq74+PcsuU2LezpmDz4b/w9vRyc=";
|
2023-02-22 10:55:15 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ pybind11 ];
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
# tests are removed from fork
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "fasttext" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "fasttext with wheels and no external dependency, but only the predict method (<1MB)";
|
|
|
|
homepage = "https://github.com/searxng/fasttext-predict/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
# ImportError: dynamic module does not define module export function (PyInit_fasttext_pybind)
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
};
|
|
|
|
}
|