nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 70 lines 1.3 kB view raw
1{ stdenv 2, lib 3, anyio 4, buildPythonPackage 5, fetchFromGitHub 6, rustPlatform 7, setuptools-rust 8, pythonOlder 9, dirty-equals 10, pytest-mock 11, pytest-timeout 12, pytestCheckHook 13, python 14}: 15 16buildPythonPackage rec { 17 pname = "watchfiles"; 18 version = "0.14.1"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "samuelcolvin"; 25 repo = pname; 26 rev = "v${version}"; 27 hash = "sha256-XjmmyL7ZRqkYwGGk6/KkxL7e/JA43tQN4W3knTtc7t0="; 28 }; 29 30 cargoDeps = rustPlatform.fetchCargoTarball { 31 inherit src; 32 name = "${pname}-${version}"; 33 sha256 = "sha256-sZMj1HQ37gAG3WM+qBMhcCQ2MuUGom23lF8c4L0RQzM="; 34 }; 35 36 nativeBuildInputs = [ 37 setuptools-rust 38 ] ++ (with rustPlatform; [ 39 cargoSetupHook 40 rust.cargo 41 rust.rustc 42 ]); 43 44 propagatedBuildInputs = [ 45 anyio 46 ]; 47 48 checkInputs = [ 49 dirty-equals 50 pytest-mock 51 pytest-timeout 52 pytestCheckHook 53 ]; 54 55 pythonImportsCheck = [ 56 "watchfiles" 57 ]; 58 59 preCheck = '' 60 cd tests 61 ''; 62 63 meta = with lib; { 64 broken = stdenv.isDarwin; 65 description = "Simple, modern file watching and code reload"; 66 homepage = "https://watchfiles.helpmanual.io/"; 67 license = licenses.mit; 68 maintainers = with maintainers; [ fab ]; 69 }; 70}