python311Packages.fasttext-predict: unbreak on darwin

This commit is contained in:
Weijia Wang 2024-06-24 00:42:40 +02:00
parent 803a229f08
commit d6ac9fd601

View File

@ -16,6 +16,11 @@ buildPythonPackage rec {
hash = "sha256-rMbf09pCHvVYI9g/aq74+PcsuU2LezpmDz4b/w9vRyc=";
};
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py \
--replace-fail "-flto" ""
'';
nativeBuildInputs = [ pybind11 ];
# tests are removed from fork
@ -28,7 +33,5 @@ buildPythonPackage rec {
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;
};
}