18 buildPythonPackage rec {
23 disabled = pythonOlder "3.7";
25 src = fetchFromGitHub {
26 owner = "samuelcolvin";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-/qNgkPF5N8jzSV3M0YFWvQngZ4Hf4WM/GBS1LtgFbWM=";
32 cargoDeps = rustPlatform.fetchCargoTarball {
34 name = "${pname}-${version}";
35 hash = "sha256-sqHTW1+E7Fp33KW6IYlNa77AYc2iCfaSoBRXzrhEKr8=";
38 buildInputs = lib.optionals stdenv.isDarwin [
44 rustPlatform.cargoSetupHook
45 rustPlatform.maturinBuildHook
50 propagatedBuildInputs = [
54 # Tests need these permissions in order to use the FSEvents API on macOS.
56 (allow mach-lookup (global-name "com.apple.FSEvents"))
67 sed -i "/^requires-python =.*/a version = '${version}'" pyproject.toml
75 # BaseExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
76 "test_awatch_interrupt_raise"
79 pythonImportsCheck = [
84 description = "File watching and code reload";
85 mainProgram = "watchfiles";
86 homepage = "https://watchfiles.helpmanual.io/";
87 license = licenses.mit;
88 maintainers = with maintainers; [ fab ];