diff --git a/pkgs/development/python-modules/watchfiles/default.nix b/pkgs/development/python-modules/watchfiles/default.nix index f85bc75c800e..79e8395d6d49 100644 --- a/pkgs/development/python-modules/watchfiles/default.nix +++ b/pkgs/development/python-modules/watchfiles/default.nix @@ -1,5 +1,5 @@ -{ stdenv -, lib +{ lib +, stdenv , anyio , buildPythonPackage , fetchFromGitHub @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "watchfiles"; - version = "0.15.0"; + version = "0.18.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -24,13 +24,13 @@ buildPythonPackage rec { owner = "samuelcolvin"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-DibxoVH7uOy9rxzhiN4HmihA7HtdzErmJOnsI/NWY5I="; + hash = "sha256-biGGn0YAUbSO1hCJ4kU0ZWlqlXl/HRrBS3iIA3myRI8="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-EakC/rSIS42Q4Y0pvWKG7mzppU5KjCktnC09iFMZM0A="; + hash = "sha256-nmkIKA4EDMOeppOxKwLSh3oREInlDIcFzE7/EYZRGKY="; }; nativeBuildInputs = [ @@ -45,10 +45,6 @@ buildPythonPackage rec { anyio ]; - preCheck = '' - rm -rf watchfiles - ''; - checkInputs = [ dirty-equals pytest-mock @@ -56,15 +52,23 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + sed -i "/^requires-python =.*/a version = '${version}'" pyproject.toml + ''; + + preCheck = '' + rm -rf watchfiles + ''; + pythonImportsCheck = [ "watchfiles" ]; meta = with lib; { - broken = stdenv.isDarwin; - description = "Simple, modern file watching and code reload"; + description = "File watching and code reload"; homepage = "https://watchfiles.helpmanual.io/"; license = licenses.mit; maintainers = with maintainers; [ fab ]; + broken = stdenv.isDarwin; }; }