3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/watchfiles/default.nix
2022-07-21 22:35:22 +02:00

71 lines
1.2 KiB
Nix

{ stdenv
, lib
, anyio
, buildPythonPackage
, fetchFromGitHub
, rustPlatform
, setuptools-rust
, pythonOlder
, dirty-equals
, pytest-mock
, pytest-timeout
, pytestCheckHook
, python
}:
buildPythonPackage rec {
pname = "watchfiles";
version = "0.15.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "samuelcolvin";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-DibxoVH7uOy9rxzhiN4HmihA7HtdzErmJOnsI/NWY5I=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-EakC/rSIS42Q4Y0pvWKG7mzppU5KjCktnC09iFMZM0A=";
};
nativeBuildInputs = [
] ++ (with rustPlatform; [
cargoSetupHook
maturinBuildHook
rust.cargo
rust.rustc
]);
propagatedBuildInputs = [
anyio
];
preCheck = ''
rm -rf watchfiles
'';
checkInputs = [
dirty-equals
pytest-mock
pytest-timeout
pytestCheckHook
];
pythonImportsCheck = [
"watchfiles"
];
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 ];
};
}