2017-09-26 14:34:43 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2017-10-01 12:00:26 +02:00
|
|
|
, fetchFromGitHub
|
2017-09-26 14:34:43 +02:00
|
|
|
, nose
|
|
|
|
, django
|
|
|
|
, tornado
|
|
|
|
, six
|
2017-10-01 12:00:26 +02:00
|
|
|
, pytest
|
2017-09-26 14:34:43 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "livereload";
|
2018-11-29 12:52:21 +01:00
|
|
|
version = "2.6.0";
|
2017-09-26 14:34:43 +02:00
|
|
|
|
2017-10-01 12:00:26 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lepture";
|
|
|
|
repo = "python-livereload";
|
|
|
|
rev = "v${version}";
|
2018-11-29 12:52:21 +01:00
|
|
|
sha256 = "0p3yvvr1iv3fv3pwc2qfzl3mi3b5zv6dh7kmfm1k7krxvganj87n";
|
2017-09-26 14:34:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ nose django ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ tornado six ];
|
|
|
|
|
2018-11-29 12:52:21 +01:00
|
|
|
# Remove this patch when PR merged
|
|
|
|
# https://github.com/lepture/python-livereload/pull/173
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_watcher.py \
|
|
|
|
--replace 'watcher.watch(filepath, add_count)' \
|
|
|
|
'add_count.repr_str = "add_count test task"; watcher.watch(filepath, add_count)'
|
|
|
|
'';
|
|
|
|
|
2017-10-01 12:00:26 +02:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = "pytest tests";
|
|
|
|
|
2017-09-26 14:34:43 +02:00
|
|
|
meta = {
|
|
|
|
description = "Runs a local server that reloads as you develop";
|
|
|
|
homepage = "https://github.com/lepture/python-livereload";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|