diff options
Diffstat (limited to 'pkgs/development/python-modules/watchfiles/default.nix')
-rw-r--r-- | pkgs/development/python-modules/watchfiles/default.nix | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/watchfiles/default.nix b/pkgs/development/python-modules/watchfiles/default.nix new file mode 100644 index 00000000000..49cbef94b88 --- /dev/null +++ b/pkgs/development/python-modules/watchfiles/default.nix @@ -0,0 +1,70 @@ +{ stdenv +, lib +, anyio +, buildPythonPackage +, fetchFromGitHub +, rustPlatform +, setuptools-rust +, pythonOlder +, dirty-equals +, pytest-mock +, pytest-timeout +, pytestCheckHook +, python +}: + +buildPythonPackage rec { + pname = "watchfiles"; + version = "0.14.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "samuelcolvin"; + repo = pname; + rev = "v${version}"; + hash = "sha256-XjmmyL7ZRqkYwGGk6/KkxL7e/JA43tQN4W3knTtc7t0="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "sha256-sZMj1HQ37gAG3WM+qBMhcCQ2MuUGom23lF8c4L0RQzM="; + }; + + nativeBuildInputs = [ + setuptools-rust + ] ++ (with rustPlatform; [ + cargoSetupHook + rust.cargo + rust.rustc + ]); + + propagatedBuildInputs = [ + anyio + ]; + + checkInputs = [ + dirty-equals + pytest-mock + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ + "watchfiles" + ]; + + preCheck = '' + cd tests + ''; + + meta = with lib; { + broken = stdenv.isDarwin; + description = "Simple, modern file watching and code reload"; + homepage = "https://watchfiles.helpmanual.io/"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} |