diff --git a/pkgs/development/python-modules/py3langid/default.nix b/pkgs/development/python-modules/py3langid/default.nix index b4e001b20a24..bbc8b3492e80 100644 --- a/pkgs/development/python-modules/py3langid/default.nix +++ b/pkgs/development/python-modules/py3langid/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchPypi, pythonOlder, + setuptools, numpy, pytestCheckHook, }: @@ -10,7 +11,7 @@ buildPythonPackage rec { pname = "py3langid"; version = "0.3.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -19,6 +20,8 @@ buildPythonPackage rec { hash = "sha256-CodaAxpYqvnb2nu4KF/XXoAae9J2IW/6vgN5AdS0Sew="; }; + nativeBuildInputs = [ setuptools ]; + propagatedBuildInputs = [ numpy ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -26,6 +29,8 @@ buildPythonPackage rec { # nixify path to the courlan binary in the test suite postPatch = '' substituteInPlace tests/test_langid.py --replace "'langid'" "'$out/bin/langid'" + substituteInPlace pyproject.toml --replace-fail \ + 'numpy >= 2.0.0' numpy ''; pythonImportsCheck = [ "py3langid" ];